({
theme,
isOutlined,
disabled,
selectedColor,
selectedBackgroundColor,
customRippleColor,
}: BaseProps & {
selectedBackgroundColor: string;
selectedColor?: string;
customRippleColor?: ColorValue;
})
| 234 | }; |
| 235 | |
| 236 | const getRippleColor = ({ |
| 237 | theme, |
| 238 | isOutlined, |
| 239 | disabled, |
| 240 | selectedColor, |
| 241 | selectedBackgroundColor, |
| 242 | customRippleColor, |
| 243 | }: BaseProps & { |
| 244 | selectedBackgroundColor: string; |
| 245 | selectedColor?: string; |
| 246 | customRippleColor?: ColorValue; |
| 247 | }) => { |
| 248 | if (customRippleColor) { |
| 249 | return customRippleColor; |
| 250 | } |
| 251 | |
| 252 | const isSelectedColor = selectedColor !== undefined; |
| 253 | const textColor = getTextColor({ |
| 254 | theme, |
| 255 | disabled, |
| 256 | selectedColor, |
| 257 | isOutlined, |
| 258 | }); |
| 259 | |
| 260 | if (theme.isV3) { |
| 261 | if (isSelectedColor) { |
| 262 | return color(selectedColor).alpha(0.12).rgb().string(); |
| 263 | } |
| 264 | |
| 265 | return color(textColor).alpha(0.12).rgb().string(); |
| 266 | } |
| 267 | |
| 268 | if (isSelectedColor) { |
| 269 | return color(selectedColor).fade(0.5).rgb().string(); |
| 270 | } |
| 271 | |
| 272 | return selectedBackgroundColor; |
| 273 | }; |
| 274 | |
| 275 | export const getChipColors = ({ |
| 276 | isOutlined, |
no test coverage detected
searching dependent graphs…