-
-
Notifications
You must be signed in to change notification settings - Fork 6
feat: Alert/Aside component #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Adammatthiesen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Biggest thing... make sure your linting with the repo's linter... and our linter only...
| interface Props { | ||
| title: string; | ||
| variant?: "default" | "success" | "danger" | "info" | "warning" | "mono"; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would really love to see the full range of props we usually try to support on our elements... esp in cases where we might use them in the CMS and need access to standard HTML attributes. We do have quite a few examples of this across the codebase you could reference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also would be nice to have an optional Icon override...
|
|
||
| const { title, variant = "default" } = Astro.props; | ||
|
|
||
| const variantToIcon: Record<NonNullable<Props["variant"]>, string> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual AvailableIcon type could be used here instead of string for type safety
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
erm... seems like your system isn't using our linter... please make sure to run the pnpm lint:fix command to process with biome!
|
Oh i just noticed this was a draft.... 😅 |
Closes #132
Description
default | success | danger | info | warning | mono