( color: YaakColor | null, isDefault = false, )
| 144 | } |
| 145 | |
| 146 | function buttonSolidColorVariables( |
| 147 | color: YaakColor | null, |
| 148 | isDefault = false, |
| 149 | ): Partial<CSSVariables> { |
| 150 | if (color == null) return {}; |
| 151 | |
| 152 | const theme: Partial<ThemeComponentColors> = { |
| 153 | text: "white", |
| 154 | surface: color.lower(0.3).css(), |
| 155 | surfaceHighlight: color.lower(0.1).css(), |
| 156 | border: color.css(), |
| 157 | }; |
| 158 | |
| 159 | if (isDefault) { |
| 160 | theme.text = undefined; |
| 161 | theme.surface = undefined; |
| 162 | theme.surfaceHighlight = color.lift(0.08).css(); |
| 163 | } |
| 164 | |
| 165 | return theme; |
| 166 | } |
| 167 | |
| 168 | function buttonBorderColorVariables( |
| 169 | color: YaakColor | null, |
no test coverage detected