({
theme,
isOutlined,
disabled,
selectedColor,
}: BaseProps & {
selectedColor?: string;
})
| 198 | }; |
| 199 | |
| 200 | const getIconColor = ({ |
| 201 | theme, |
| 202 | isOutlined, |
| 203 | disabled, |
| 204 | selectedColor, |
| 205 | }: BaseProps & { |
| 206 | selectedColor?: string; |
| 207 | }) => { |
| 208 | const isSelectedColor = selectedColor !== undefined; |
| 209 | if (theme.isV3) { |
| 210 | if (disabled) { |
| 211 | return theme.colors.onSurfaceDisabled; |
| 212 | } |
| 213 | |
| 214 | if (isSelectedColor) { |
| 215 | return selectedColor; |
| 216 | } |
| 217 | |
| 218 | if (isOutlined) { |
| 219 | return theme.colors.onSurfaceVariant; |
| 220 | } |
| 221 | |
| 222 | return theme.colors.onSecondaryContainer; |
| 223 | } |
| 224 | |
| 225 | if (disabled) { |
| 226 | return theme.colors.disabled; |
| 227 | } |
| 228 | |
| 229 | if (isSelectedColor) { |
| 230 | return color(selectedColor).alpha(0.54).rgb().string(); |
| 231 | } |
| 232 | |
| 233 | return color(theme.colors.text).alpha(0.54).rgb().string(); |
| 234 | }; |
| 235 | |
| 236 | const getRippleColor = ({ |
| 237 | theme, |
no outgoing calls
no test coverage detected
searching dependent graphs…