frontend: add danger button variant

Pedro Lucas Porcellis porcellis@eletrotupi.com 1 month ago 7d2b76a987098caa7e4b365e4d41c0bd0a7a2692
Parents: 5c34c8e
1 file(s) changed
  • frontend/components/ui/Button.tsx +3 -1
frontend/components/ui/Button.tsx
@@ -12,7 +12,7 @@ import { useThemeColor } from '@/hooks/use-theme-color';
12 12
13 13 interface ButtonProps extends TouchableOpacityProps {
14 14 title: string;
15 - variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'dashed';
15 + variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'dashed' | 'danger';
16 16 size?: 'small' | 'medium' | 'large';
17 17 loading?: boolean;
18 18 disabled?: boolean;
@@ -45,6 +45,8 @@ case 'primary':
45 45 return primaryColor;
46 46 case 'secondary':
47 47 return useThemeColor({ light: '#f3f4f6', dark: '#374151' }, 'background');
48 + case 'danger':
49 + return useThemeColor({}, 'danger');
48 50 case 'outline':
49 51 case 'ghost':
50 52 case 'dashed':