Skip to content

Commit

Permalink
button (#3351)
Browse files Browse the repository at this point in the history
  • Loading branch information
ingawei authored Jan 14, 2025
1 parent 992c87a commit 27af447
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions mani/components/buttons/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,15 @@ export function Button({
switch (variant) {
case 'yes':
return {
background: color.yesButtonBackground,
text: color.yesButtonText,
background:
size === 'lg' ? color.yesButtonText : color.yesButtonBackground,
text: size === 'lg' ? color.background : color.yesButtonText,
}
case 'no':
return {
background: color.noButtonBackground,
text: color.noButtonText,
background:
size === 'lg' ? color.noButtonText : color.noButtonBackground,
text: size === 'lg' ? color.background : color.noButtonText,
}
case 'gray':
return {
Expand Down
2 changes: 1 addition & 1 deletion mani/components/buttons/yes-no-buttons.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, ButtonProps } from './button'

const getWidth = (size?: ButtonProps['size']) => {
return size === 'xs' ? 44 : undefined
return size === 'xs' ? 46 : undefined
}

export function YesNoButton(props: ButtonProps) {
Expand Down

0 comments on commit 27af447

Please sign in to comment.