({
theme,
disabled,
error,
activeUnderlineColor,
activeOutlineColor,
mode,
}: BaseProps & {
error?: boolean;
activeUnderlineColor?: string;
activeOutlineColor?: string;
mode?: Mode;
})
| 336 | }; |
| 337 | |
| 338 | const getActiveColor = ({ |
| 339 | theme, |
| 340 | disabled, |
| 341 | error, |
| 342 | activeUnderlineColor, |
| 343 | activeOutlineColor, |
| 344 | mode, |
| 345 | }: BaseProps & { |
| 346 | error?: boolean; |
| 347 | activeUnderlineColor?: string; |
| 348 | activeOutlineColor?: string; |
| 349 | mode?: Mode; |
| 350 | }) => { |
| 351 | const isFlat = mode === 'flat'; |
| 352 | const modeColor = isFlat ? activeUnderlineColor : activeOutlineColor; |
| 353 | |
| 354 | if (error) { |
| 355 | return theme.colors.error; |
| 356 | } |
| 357 | |
| 358 | if (modeColor) { |
| 359 | return modeColor; |
| 360 | } |
| 361 | |
| 362 | if (disabled) { |
| 363 | if (theme.isV3) { |
| 364 | return theme.colors.onSurfaceDisabled; |
| 365 | } |
| 366 | |
| 367 | return color(theme.colors.text).alpha(0.54).rgb().string(); |
| 368 | } |
| 369 | |
| 370 | return theme.colors.primary; |
| 371 | }; |
| 372 | |
| 373 | const getPlaceholderColor = ({ theme, disabled }: BaseProps) => { |
| 374 | if (theme.isV3) { |
no outgoing calls
no test coverage detected
searching dependent graphs…