Skip to content

[Feat]: #1466 Add disabled/placeholder styles for the main components #1815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Prev Previous commit
Next Next commit
remove border styles from disables
  • Loading branch information
iamfaran committed Jun 26, 2025
commit 9ad28bb706d06eae0e9ef8176fa716f7e83969b9
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ export function getButtonStyle(buttonStyle: ButtonStyleType, disabledStyle?: any
&.ant-btn-disabled {
color: ${disabledStyle?.disabledText || buttonStyle.text};
background: ${disabledStyle?.disabledBackground || buttonStyle.background};
border-color: ${
disabledStyle?.disabledBorder || buttonStyle.border
} !important;
cursor: not-allowed;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,13 @@ const InputNumber = styled(AntdInputNumber)<{
&.ant-input-number-disabled {
color: ${(props) => props.$disabledStyle?.disabledText || props.$style.text} !important;
background: ${(props) => props.$disabledStyle?.disabledBackground || props.$style.background} !important;
border-color: ${(props) => props.$disabledStyle?.disabledBorder || props.$style.border} !important;
cursor: not-allowed;

.ant-input-number-input {
color: ${(props) => props.$disabledStyle?.disabledText || props.$style.text} !important;
background: ${(props) => props.$disabledStyle?.disabledBackground || props.$style.background} !important;
}

.ant-input-number-handler-wrap {
background: ${(props) => props.$disabledStyle?.disabledBackground || props.$style.background} !important;
border-color: ${(props) => props.$disabledStyle?.disabledBorder || props.$style.border} !important;

.ant-input-number-handler span {
color: ${(props) => props.$disabledStyle?.disabledText || props.$style.text} !important;
opacity: 0.3;
}
}
}
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ const InputStyle = styled(Input)<{
&.ant-input-disabled {
color: ${(props) => props.$disabledStyle?.disabledText || props.$style.text} !important;
background: ${(props) => props.$disabledStyle?.disabledBackground || props.$style.background} !important;
border-color: ${(props) => props.$disabledStyle?.disabledBorder || props.$style.border} !important;
cursor: not-allowed;
}
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ const PasswordStyle = styled(InputPassword)<{
&.ant-input-disabled {
color: ${(props) => props.$disabledStyle?.disabledText || props.$style.text} !important;
background: ${(props) => props.$disabledStyle?.disabledBackground || props.$style.background} !important;
border-color: ${(props) => props.$disabledStyle?.disabledBorder || props.$style.border} !important;
cursor: not-allowed;
}
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ const TextAreaStyled = styled(TextArea)<{
&.ant-input-disabled {
color: ${(props) => props.$disabledStyle?.disabledText || props.$style.text} !important;
background: ${(props) => props.$disabledStyle?.disabledBackground || props.$style.background} !important;
border-color: ${(props) => props.$disabledStyle?.disabledBorder || props.$style.border} !important;
cursor: not-allowed;
}
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -966,12 +966,7 @@ const DISABLED_BACKGROUND = {
color: SECOND_SURFACE_COLOR,
} as const;

const DISABLED_BORDER = {
name: "disabledBorder",
label: trans("style.disabledBorder"),
depName: "disabledBackground",
transformer: backgroundToBorder,
} as const;


const DISABLED_TEXT = {
name: "disabledText",
Expand All @@ -984,7 +979,6 @@ const DISABLED_TEXT = {
// Re-export for reuse in other components if needed
export const DISABLED_STYLE_FIELDS = [
DISABLED_BACKGROUND,
DISABLED_BORDER,
DISABLED_TEXT,
] as const;

Expand All @@ -995,12 +989,6 @@ const DISABLED_INPUT_BACKGROUND = {
color: SECOND_SURFACE_COLOR,
} as const;

const DISABLED_INPUT_BORDER = {
name: "disabledBorder",
label: trans("style.disabledBorder"),
depName: "disabledInputBackground",
transformer: backgroundToBorder,
} as const;

const DISABLED_INPUT_TEXT = {
name: "disabledText",
Expand All @@ -1013,7 +1001,6 @@ const DISABLED_INPUT_TEXT = {
// Re-export for reuse in textInput components
export const DISABLED_INPUT_STYLE_FIELDS = [
DISABLED_INPUT_BACKGROUND,
DISABLED_INPUT_BORDER,
DISABLED_INPUT_TEXT,
] as const;

Expand Down