({ theme, disabled, type }: BaseProps)
| 9 | }; |
| 10 | |
| 11 | export function getTextColor({ theme, disabled, type }: BaseProps) { |
| 12 | const { colors, dark } = theme; |
| 13 | |
| 14 | if (type === 'error') { |
| 15 | return colors?.error; |
| 16 | } |
| 17 | |
| 18 | if (theme.isV3) { |
| 19 | if (disabled) { |
| 20 | return theme.colors.onSurfaceDisabled; |
| 21 | } else { |
| 22 | return theme.colors.onSurfaceVariant; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | return color(theme?.colors?.text) |
| 27 | .alpha(dark ? 0.7 : 0.54) |
| 28 | .rgb() |
| 29 | .string(); |
| 30 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…