({
theme,
isTextInputFocused,
disabled,
customColor,
}: BaseProps & {
isTextInputFocused: boolean;
customColor?: ((isTextInputFocused: boolean) => string | undefined) | string;
})
| 21 | } |
| 22 | |
| 23 | export function getIconColor({ |
| 24 | theme, |
| 25 | isTextInputFocused, |
| 26 | disabled, |
| 27 | customColor, |
| 28 | }: BaseProps & { |
| 29 | isTextInputFocused: boolean; |
| 30 | customColor?: ((isTextInputFocused: boolean) => string | undefined) | string; |
| 31 | }) { |
| 32 | if (typeof customColor === 'function') { |
| 33 | return customColor(isTextInputFocused); |
| 34 | } |
| 35 | if (customColor) { |
| 36 | return customColor; |
| 37 | } |
| 38 | |
| 39 | if (!theme.isV3) { |
| 40 | return theme.colors.text; |
| 41 | } |
| 42 | |
| 43 | if (disabled) { |
| 44 | return theme.colors.onSurfaceDisabled; |
| 45 | } |
| 46 | |
| 47 | return theme.colors.onSurfaceVariant; |
| 48 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…