Conversation
Contributor
|
@aftabrehan please review. |
aftabrehan
requested changes
Apr 14, 2022
Member
aftabrehan
left a comment
There was a problem hiding this comment.
Looks good to me. 👍
Just a minor changes. Good work. 💯
Comment on lines
+1
to
+15
| import { Badge, PillBadges, ButtonBadges } from "kbs-core"; | ||
|
|
||
| function Badges() { | ||
| return ( | ||
| <div> | ||
| <Badge variant="primary" label="Primary" /> | ||
| <Badge variant="Seconday" label="Badge" /> | ||
| <Badge variant="Dark h1" label="Badge" /> | ||
| <PillBadges variant="primary" label="Primary" /> | ||
| <ButtonBadges buttonvariant="primary" labelvariant="light" label="2" /> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| export default Badges; |
Member
There was a problem hiding this comment.
Move this in badge.ts 🙏
Use first letter capital only for components name, and just write your code in .ts file. Thanks!
| </span> | ||
| ); | ||
| } | ||
| export default PillBadges; |
Member
There was a problem hiding this comment.
Rename this file as BadgePill.tsx. 👉
| import Badge from "./components/Badge"; | ||
| import PillBadges from "./components/PillBadges"; | ||
| import ButtonBadges from "./components/ButtonBadge"; | ||
| export { Button, type ButtonProps } from "./Button"; |
Member
There was a problem hiding this comment.
It's a good practice to have an empty line between imports & exports. 👍
Suggested change
| export { Button, type ButtonProps } from "./Button"; | |
| export { Button, type ButtonProps } from "./Button"; |
| </button> | ||
| ); | ||
| } | ||
| export default ButtonBadges; |
Member
There was a problem hiding this comment.
Can be it renamed as BadgeButton.tsx.
| @@ -0,0 +1,9 @@ | |||
| function ButtonBadges(props: any) { | |||
| return ( | |||
| <button type="button" className={`btn btn-${props.buttonvariant}`}> | |||
Member
There was a problem hiding this comment.
Use camelCase.
Suggested change
| <button type="button" className={`btn btn-${props.buttonvariant}`}> | |
| <button type="button" className={`btn btn-${props.buttonVariant}`}> |
| return ( | ||
| <button type="button" className={`btn btn-${props.buttonvariant}`}> | ||
| Notifications | ||
| <span className={`badge bg-${props.labelvariant}`}>{props.label}</span> |
Member
There was a problem hiding this comment.
Again...
Suggested change
| <span className={`badge bg-${props.labelvariant}`}>{props.label}</span> | |
| <span className={`badge bg-${props.labelVariant}`}>{props.label}</span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2