Skip to content

Commit

Permalink
feat: add success btn recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
alter-eggo committed Dec 9, 2024
1 parent ede9b75 commit b14cf16
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/panda-preset/src/recipes/button-recipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export const buttonRecipe = defineRecipe({
size: {
sm: {
px: 'space.02',
py: 'space.01',
height: '40px',
},
md: {
px: 'space.04',
py: 'space.03',
height: '48px',
},
},
variant: {
Expand Down Expand Up @@ -106,6 +106,11 @@ export const buttonRecipe = defineRecipe({
},
...loadingStyles,
},

success: {
bg: 'green.action-primary-default',
color: 'ink.background-primary',
},
},

invert: { true: {} },
Expand Down
11 changes: 11 additions & 0 deletions packages/ui/src/components/button/button.web.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ export const Disabled: Story = {
},
};

export const Success: Story = {
parameters: {
controls: { include: ['size', 'variant'] },
},
args: {
children: 'Button',
size: 'md',
variant: 'success',
},
};

export const WithIcons: Story = {
parameters: {
controls: { include: ['size', 'variant'] },
Expand Down

0 comments on commit b14cf16

Please sign in to comment.