({
dark,
backgroundColor,
}: {
dark?: boolean;
backgroundColor?: string;
})
| 20 | }; |
| 21 | |
| 22 | const isDark = ({ |
| 23 | dark, |
| 24 | backgroundColor, |
| 25 | }: { |
| 26 | dark?: boolean; |
| 27 | backgroundColor?: string; |
| 28 | }) => { |
| 29 | if (typeof dark === 'boolean') { |
| 30 | return dark; |
| 31 | } |
| 32 | |
| 33 | if (backgroundColor === 'transparent') { |
| 34 | return false; |
| 35 | } |
| 36 | |
| 37 | if (backgroundColor !== 'transparent') { |
| 38 | return !color(backgroundColor).isLight(); |
| 39 | } |
| 40 | |
| 41 | return false; |
| 42 | }; |
| 43 | |
| 44 | const getButtonBackgroundColor = ({ |
| 45 | isMode, |
no outgoing calls
no test coverage detected
searching dependent graphs…