( theme: ReturnType<typeof useTheme>, variant: RenderUIButtonVariant, isHovered: boolean, )
| 32 | } |
| 33 | |
| 34 | const getButtonColors = ( |
| 35 | theme: ReturnType<typeof useTheme>, |
| 36 | variant: RenderUIButtonVariant, |
| 37 | isHovered: boolean, |
| 38 | ) => { |
| 39 | if (variant === 'secondary') { |
| 40 | return { |
| 41 | backgroundColor: isHovered ? theme.surfaceHover : theme.surface, |
| 42 | foregroundColor: theme.foreground, |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | return { |
| 47 | backgroundColor: theme.primary, |
| 48 | foregroundColor: theme.name === 'dark' ? '#111827' : '#ffffff', |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | const CLICK_FLASH_DURATION_MS = 150 |
| 53 |