-
Notifications
You must be signed in to change notification settings - Fork 618
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
New Admin UI - Alert Component #4386
Conversation
/storybook |
🚀 Storybook Preview |
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.
Thanks, Adrian. I’ve just highlighted a minor fix proposed by GitHub Action. The rest is 👍
const AlertContext = React.createContext<Pick<AlertProps, "variant">>({}); | ||
|
||
const AlertActionBase = React.forwardRef<HTMLButtonElement, ButtonProps>( | ||
({ className, ...props }, ref) => { |
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.
Github Action warning
Changes
This PR introduces the Alert component.
We have four types of alerts: info, success, warning, and danger. We also have two variants: strong and subtle. In total, visually, we ended up with 8 different variants (it's all per Figma specs ofc).
Screenshots below.
Extra Changes
1. Imported Tokens
I reimported the tokens from Figma. A couple of missing tokens were added.
2. Fixed HLS Colors
HSL colors were incorrectly generated in
theme.scss
file, because there were commas between the HSL numbers. For example:--bg-secondary-default: 170, 100%, 37.5%;
--bg-primary-muted: 14 94.7% 77.8%;
I noticed this while trying to apply opacity on one of the colors (e.g.
bg-primary/50
).This has now been resolved.
3. Button: Added
ghost-negative
VariantTalked with Kreso about this and ultimately, we decided to intro a new button variant. This variant of a button is used on strong variants of all types of alerts.
Screenshots