({
theme,
variant,
disabled,
customColor,
customBackgroundColor,
customRippleColor,
}: {
theme: InternalTheme;
variant: string;
disabled?: boolean;
customColor?: string;
customBackgroundColor?: ColorValue;
customRippleColor?: ColorValue;
})
| 259 | }; |
| 260 | |
| 261 | export const getFABColors = ({ |
| 262 | theme, |
| 263 | variant, |
| 264 | disabled, |
| 265 | customColor, |
| 266 | customBackgroundColor, |
| 267 | customRippleColor, |
| 268 | }: { |
| 269 | theme: InternalTheme; |
| 270 | variant: string; |
| 271 | disabled?: boolean; |
| 272 | customColor?: string; |
| 273 | customBackgroundColor?: ColorValue; |
| 274 | customRippleColor?: ColorValue; |
| 275 | }) => { |
| 276 | const isVariant = (variantToCompare: Variant) => { |
| 277 | return variant === variantToCompare; |
| 278 | }; |
| 279 | |
| 280 | const baseFABColorProps = { theme, isVariant, disabled }; |
| 281 | |
| 282 | const backgroundColor = getBackgroundColor({ |
| 283 | ...baseFABColorProps, |
| 284 | customBackgroundColor, |
| 285 | }); |
| 286 | |
| 287 | const foregroundColor = getForegroundColor({ |
| 288 | ...baseFABColorProps, |
| 289 | customColor, |
| 290 | backgroundColor, |
| 291 | }); |
| 292 | |
| 293 | return { |
| 294 | backgroundColor, |
| 295 | foregroundColor, |
| 296 | rippleColor: |
| 297 | customRippleColor || color(foregroundColor).alpha(0.12).rgb().string(), |
| 298 | }; |
| 299 | }; |
| 300 | |
| 301 | const getLabelColor = ({ theme }: { theme: InternalTheme }) => { |
| 302 | if (theme.isV3) { |
no test coverage detected
searching dependent graphs…