eletrotupi / tcc/ commit / a7d36a3

frontend: slight variations experiments with secondary button colors

Pedro Lucas Porcellis porcellis@eletrotupi.com 1 month ago a7d36a37e2d249aace068a6e327627de78bc448d
Parents: 5d2d880
1 file(s) changed
  • frontend/components/ui/Button.tsx +3 -1
frontend/components/ui/Button.tsx
1 1
import React from 'react';
2 2
import {
3 3
  TouchableOpacity,
4 4
  Text,
5 5
  StyleSheet,
▸ 36 unchanged lines
42 42
    if (disabled) return useThemeColor({ light: '#e5e5e5', dark: '#404040' }, 'background');
43 43
    switch (variant) {
44 44
      case 'primary':
45 45
        return primaryColor;
46 46
      case 'secondary':
47 -
        return useThemeColor({ light: '#f3f4f6', dark: '#374151' }, 'background');
47 +
        return useThemeColor({}, 'secondaryBackground');
48 48
      case 'danger':
49 49
        return useThemeColor({}, 'danger');
50 50
      case 'outline':
51 51
      case 'ghost':
52 52
      case 'dashed':
▸ 6 unchanged lines
59 59
  const getTextColor = () => {
60 60
    if (disabled) return useThemeColor({}, 'text');
61 61

62 62
    switch (variant) {
63 63
      case 'primary':
64 +
        return textColor;
64 65
      case 'secondary':
66 +
        return useThemeColor({}, 'white');
65 67
      case 'outline':
66 68
      case 'ghost':
67 69
        return textColor;
68 70
      case 'dashed':
69 71
        return textSecondaryColor;
▸ 102 unchanged lines
172 174
  },
173 175
  text: {
174 176
    fontWeight: '600',
175 177
  },
176 178
});