Skip to content

Commit

Permalink
feat: Button[variant=tertiary] を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
uknmr committed Oct 16, 2024
1 parent c4e5822 commit 1ba7e12
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions packages/smarthr-ui/src/components/Button/ButtonWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const button = tv({
variant: {
primary: {},
secondary: {},
tertiary: {},
danger: {},
skeleton: {},
text: {},
Expand Down Expand Up @@ -254,6 +255,35 @@ const button = tv({
'[&:not([href])]:shr-text-disabled',
],
},
{
slots: ['default', 'anchor'],
variant: 'tertiary',
className: [
'shr-border-transparent',
'shr-bg-transparent',
'shr-text-link',
'focus-visible:shr-bg-white-darken',
'hover:shr-bg-white-darken',
],
},
{
slots: ['default'],
variant: 'tertiary',
className: [
'aria-disabled:shr-border-transparent',
'aria-disabled:shr-bg-transparent',
'aria-disabled:shr-text-disabled',
],
},
{
slots: ['anchor'],
variant: 'tertiary',
className: [
'[&:not([href])]:shr-border-transparent',
'[&:not([href])]:shr-bg-transparent',
'[&:not([href])]:shr-text-disabled',
],
},
{
slots: ['default', 'anchor'],
variant: 'danger',
Expand Down
2 changes: 1 addition & 1 deletion packages/smarthr-ui/src/components/Button/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ export type BaseProps = PropsWithChildren<{
loading?: boolean
}>

export type Variant = 'primary' | 'secondary' | 'danger' | 'skeleton' | 'text'
export type Variant = 'primary' | 'secondary' | 'tertiary' | 'danger' | 'skeleton' | 'text'

0 comments on commit 1ba7e12

Please sign in to comment.