Skip to content
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

Merged
merged 11 commits into from
Nov 19, 2024
Merged

New Admin UI - Alert Component #4386

merged 11 commits into from
Nov 19, 2024

Conversation

adrians5j
Copy link
Member

@adrians5j adrians5j commented Nov 13, 2024

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:

Previously (Incorrect) Now
--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 Variant

Talked 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

image

image image

@adrians5j adrians5j marked this pull request as ready for review November 15, 2024 15:09
@leopuleo
Copy link
Contributor

/storybook

Copy link

🚀 Storybook Preview
You can preview the Storybook by visiting the link below:

Storybook Preview URL

Copy link
Contributor

@leopuleo leopuleo left a 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) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Github Action warning

@adrians5j adrians5j merged commit e93b67c into feat/new-admin-ui Nov 19, 2024
15 checks passed
@adrians5j adrians5j deleted the feat/alerts branch January 7, 2025 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants