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
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip
  • Loading branch information
adrians5j committed Nov 15, 2024
commit 75ec54d5139b924ecdb8ea796788714c8354c750
3,375 changes: 3,374 additions & 1 deletion packages/admin-ui/scripts/importFromFigma/exports/Alias tokens.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/admin-ui/src/Alert/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@
const AlertContext = React.createContext<Pick<AlertProps, "variant">>({});

const AlertActionBase = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, ...props }, ref) => {

Check warning on line 118 in packages/admin-ui/src/Alert/Alert.tsx

View workflow job for this annotation

GitHub Actions / Static code analysis

'className' is defined but never used
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

const { variant: alertVariant } = React.useContext(AlertContext);
return (
<Button
text={"Button"}
variant={alertVariant === 'strong' ? "secondary" : "tertiary"}
variant={alertVariant === "strong" ? "secondary" : "tertiary"}
size={"sm"}
className={'mr-sm-plus'}
className={"mr-sm-plus"}
ref={ref}
{...props}
/>
Expand Down
5 changes: 4 additions & 1 deletion packages/admin-ui/src/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ const meta: Meta<typeof Button> = {
tags: ["autodocs"],
// More on argTypes: https://storybook.js.org/docs/api/argtypes
argTypes: {
variant: { control: "select", options: ["primary", "secondary", "tertiary", "ghost", "ghost-negative"] },
variant: {
control: "select",
options: ["primary", "secondary", "tertiary", "ghost", "ghost-negative"]
},
size: { control: "select", options: ["sm", "md", "lg", "xl"] },
disabled: { control: "boolean" },
text: { control: "text" },
Expand Down
Loading