Web:Common:Fix TextareaTheme, InputBlockTheme, TextInputTheme, ComboButtonTheme.
This commit is contained in:
parent
f790f970af
commit
8f8cb84d9c
@ -2,12 +2,14 @@ import styled, { css } from "styled-components";
|
||||
import { StyledComboButton } from "@docspace/components/combobox/sub-components/styled-combobutton";
|
||||
import Base from "@docspace/components/themes/base";
|
||||
|
||||
const getDefaultStyles = ({ currentColorScheme, isOpen, theme }) => css`
|
||||
border-color: ${isOpen &&
|
||||
(theme.isBase === true
|
||||
? currentColorScheme.accentColor
|
||||
: theme.comboBox.button.openBorderColor)};
|
||||
`;
|
||||
const getDefaultStyles = ({ currentColorScheme, isOpen, theme }) =>
|
||||
currentColorScheme &&
|
||||
css`
|
||||
border-color: ${isOpen &&
|
||||
(theme.isBase
|
||||
? currentColorScheme.accentColor
|
||||
: theme.comboBox.button.openBorderColor)};
|
||||
`;
|
||||
|
||||
StyledComboButton.defaultProps = { theme: Base };
|
||||
|
||||
|
@ -3,14 +3,16 @@ import styled, { css } from "styled-components";
|
||||
import { StyledInputGroup } from "@docspace/components/input-block/styled-input-block";
|
||||
import Base from "@docspace/components/themes/base";
|
||||
|
||||
const getDefaultStyles = ({ currentColorScheme, hasError, theme }) => css`
|
||||
:focus-within {
|
||||
border-color: ${(hasError && theme.input.focusErrorBorderColor) ||
|
||||
(theme.isBase === true
|
||||
? currentColorScheme.accentColor
|
||||
: theme.inputBlock.borderColor)};
|
||||
}
|
||||
`;
|
||||
const getDefaultStyles = ({ currentColorScheme, hasError, theme }) =>
|
||||
currentColorScheme &&
|
||||
css`
|
||||
:focus-within {
|
||||
border-color: ${(hasError && theme.input.focusErrorBorderColor) ||
|
||||
(theme.isBase
|
||||
? currentColorScheme.accentColor
|
||||
: theme.inputBlock.borderColor)};
|
||||
}
|
||||
`;
|
||||
|
||||
StyledInputGroup.defaultProps = {
|
||||
theme: Base,
|
||||
|
@ -8,16 +8,18 @@ const getDefaultStyles = ({
|
||||
hasWarning,
|
||||
isDisabled,
|
||||
theme,
|
||||
}) => css`
|
||||
:focus {
|
||||
border-color: ${(hasError && theme.input.focusErrorBorderColor) ||
|
||||
(hasWarning && theme.input.focusWarningBorderColor) ||
|
||||
(isDisabled && theme.input.focusDisabledBorderColor) ||
|
||||
(theme.isBase === true
|
||||
? currentColorScheme.accentColor
|
||||
: theme.input.focusBorderColor)};
|
||||
}
|
||||
`;
|
||||
}) =>
|
||||
currentColorScheme &&
|
||||
css`
|
||||
:focus {
|
||||
border-color: ${(hasError && theme.input.focusErrorBorderColor) ||
|
||||
(hasWarning && theme.input.focusWarningBorderColor) ||
|
||||
(isDisabled && theme.input.focusDisabledBorderColor) ||
|
||||
(theme.isBase
|
||||
? currentColorScheme.accentColor
|
||||
: theme.input.focusBorderColor)};
|
||||
}
|
||||
`;
|
||||
|
||||
StyledTextInput.defaultProps = { theme: Base };
|
||||
|
||||
|
@ -2,15 +2,17 @@ import styled, { css } from "styled-components";
|
||||
import { StyledScrollbar } from "@docspace/components/textarea/styled-textarea";
|
||||
import Base from "@docspace/components/themes/base";
|
||||
|
||||
const getDefaultStyles = ({ currentColorScheme, hasError, theme }) => css`
|
||||
:focus-within {
|
||||
border-color: ${hasError
|
||||
? theme.textArea.focusErrorBorderColor
|
||||
: theme.isBase === true
|
||||
? currentColorScheme.accentColor
|
||||
: theme.textArea.focusBorderColor};
|
||||
}
|
||||
`;
|
||||
const getDefaultStyles = ({ currentColorScheme, hasError, theme }) =>
|
||||
currentColorScheme &&
|
||||
css`
|
||||
:focus-within {
|
||||
border-color: ${hasError
|
||||
? theme.textArea.focusErrorBorderColor
|
||||
: theme.isBase
|
||||
? currentColorScheme.accentColor
|
||||
: theme.textArea.focusBorderColor};
|
||||
}
|
||||
`;
|
||||
|
||||
StyledScrollbar.defaultProps = {
|
||||
theme: Base,
|
||||
|
Loading…
Reference in New Issue
Block a user