({
theme,
isMode,
disabled,
selected,
customIconColor,
}: BaseProps & { customIconColor?: string })
| 78 | }; |
| 79 | |
| 80 | const getIconColor = ({ |
| 81 | theme, |
| 82 | isMode, |
| 83 | disabled, |
| 84 | selected, |
| 85 | customIconColor, |
| 86 | }: BaseProps & { customIconColor?: string }) => { |
| 87 | if (theme.isV3) { |
| 88 | if (disabled) { |
| 89 | return theme.colors.onSurfaceDisabled; |
| 90 | } |
| 91 | |
| 92 | if (typeof customIconColor !== 'undefined') { |
| 93 | return customIconColor; |
| 94 | } |
| 95 | |
| 96 | if (isMode('contained')) { |
| 97 | if (selected) { |
| 98 | return theme.colors.onPrimary; |
| 99 | } |
| 100 | return theme.colors.primary; |
| 101 | } |
| 102 | |
| 103 | if (isMode('contained-tonal')) { |
| 104 | if (selected) { |
| 105 | return theme.colors.onSecondaryContainer; |
| 106 | } |
| 107 | return theme.colors.onSurfaceVariant; |
| 108 | } |
| 109 | |
| 110 | if (isMode('outlined')) { |
| 111 | if (selected) { |
| 112 | return theme.colors.inverseOnSurface; |
| 113 | } |
| 114 | return theme.colors.onSurfaceVariant; |
| 115 | } |
| 116 | |
| 117 | if (selected) { |
| 118 | return theme.colors.primary; |
| 119 | } |
| 120 | return theme.colors.onSurfaceVariant; |
| 121 | } |
| 122 | |
| 123 | if (typeof customIconColor !== 'undefined') { |
| 124 | return customIconColor; |
| 125 | } |
| 126 | |
| 127 | return theme.colors.text; |
| 128 | }; |
| 129 | |
| 130 | const getRippleColor = ({ |
| 131 | theme, |
no test coverage detected
searching dependent graphs…