fix: disabled DataPicker should not have status style (#40608)

This commit is contained in:
MadCcc 2023-02-07 20:58:40 +08:00 committed by GitHub
parent 331074243a
commit 9d4216e565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -869,14 +869,14 @@ const genPickerStatusStyle: GenerateStyle<PickerToken> = (token) => {
} = token;
return {
[componentCls]: {
[`&-status-error${componentCls}`]: {
[`${componentCls}:not(${componentCls}-disabled)`]: {
[`&${componentCls}-status-error`]: {
'&, &:not([disabled]):hover': {
backgroundColor: colorBgContainer,
borderColor: colorError,
},
'&-focused, &:focus': {
[`&${componentCls}-focused, &:focus`]: {
...genActiveStyle(
mergeToken<PickerToken>(token, {
inputBorderActiveColor: colorError,
@ -891,13 +891,13 @@ const genPickerStatusStyle: GenerateStyle<PickerToken> = (token) => {
},
},
[`&-status-warning${componentCls}`]: {
[`&${componentCls}-status-warning`]: {
'&, &:not([disabled]):hover': {
backgroundColor: colorBgContainer,
borderColor: colorWarning,
},
'&-focused, &:focus': {
[`&${componentCls}-focused, &:focus`]: {
...genActiveStyle(
mergeToken<PickerToken>(token, {
inputBorderActiveColor: colorWarning,