({
theme,
mode,
customButtonColor,
customTextColor,
disabled,
dark,
}: {
theme: InternalTheme;
mode: ButtonMode;
customButtonColor?: string;
customTextColor?: string;
disabled?: boolean;
dark?: boolean;
})
| 186 | }; |
| 187 | |
| 188 | export const getButtonColors = ({ |
| 189 | theme, |
| 190 | mode, |
| 191 | customButtonColor, |
| 192 | customTextColor, |
| 193 | disabled, |
| 194 | dark, |
| 195 | }: { |
| 196 | theme: InternalTheme; |
| 197 | mode: ButtonMode; |
| 198 | customButtonColor?: string; |
| 199 | customTextColor?: string; |
| 200 | disabled?: boolean; |
| 201 | dark?: boolean; |
| 202 | }) => { |
| 203 | const isMode = (modeToCompare: ButtonMode) => { |
| 204 | return mode === modeToCompare; |
| 205 | }; |
| 206 | |
| 207 | const backgroundColor = getButtonBackgroundColor({ |
| 208 | isMode, |
| 209 | theme, |
| 210 | disabled, |
| 211 | customButtonColor, |
| 212 | }); |
| 213 | |
| 214 | const textColor = getButtonTextColor({ |
| 215 | isMode, |
| 216 | theme, |
| 217 | disabled, |
| 218 | customTextColor, |
| 219 | backgroundColor, |
| 220 | dark, |
| 221 | }); |
| 222 | |
| 223 | const borderColor = getButtonBorderColor({ isMode, theme, disabled }); |
| 224 | |
| 225 | const borderWidth = getButtonBorderWidth({ isMode, theme }); |
| 226 | |
| 227 | return { |
| 228 | backgroundColor, |
| 229 | borderColor, |
| 230 | textColor, |
| 231 | borderWidth, |
| 232 | }; |
| 233 | }; |
| 234 | |
| 235 | type ViewStyleBorderRadiusStyles = Partial< |
| 236 | Pick< |
no test coverage detected
searching dependent graphs…