mirror of
https://github.com/strapi/strapi.git
synced 2025-08-05 15:29:04 +00:00
Merge pull request #13695 from strapi/ML-folder/SelectTree-box-shadow
[ML Folder] SelectTree box shadow
This commit is contained in:
commit
d5b9f14b61
@ -8,12 +8,15 @@ const getSelectStyles = (theme, error) => {
|
|||||||
}),
|
}),
|
||||||
control: (base, state) => {
|
control: (base, state) => {
|
||||||
let border = `1px solid ${theme.colors.neutral200} !important`;
|
let border = `1px solid ${theme.colors.neutral200} !important`;
|
||||||
|
let boxShadow = 0;
|
||||||
let backgroundColor;
|
let backgroundColor;
|
||||||
|
|
||||||
if (state.isFocused) {
|
if (state.isFocused) {
|
||||||
border = `1px solid ${theme.colors.primary200} !important`;
|
border = `1px solid ${theme.colors.primary600} !important`;
|
||||||
|
boxShadow = `${theme.colors.primary600} 0px 0px 0px 2px`;
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
border = `1px solid ${theme.colors.danger600} !important`;
|
border = `1px solid ${theme.colors.danger600} !important`;
|
||||||
|
boxShadow = `${theme.colors.danger600} 0px 0px 0px 2px`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.isDisabled) {
|
if (state.isDisabled) {
|
||||||
@ -26,13 +29,13 @@ const getSelectStyles = (theme, error) => {
|
|||||||
height: 40,
|
height: 40,
|
||||||
border,
|
border,
|
||||||
outline: 0,
|
outline: 0,
|
||||||
boxShadow: 0,
|
|
||||||
borderRadius: '2px !important',
|
borderRadius: '2px !important',
|
||||||
backgroundColor,
|
backgroundColor,
|
||||||
borderTopLeftRadius: '4px !important',
|
borderTopLeftRadius: '4px !important',
|
||||||
borderTopRightRadius: '4px !important',
|
borderTopRightRadius: '4px !important',
|
||||||
borderBottomLeftRadius: '4px !important',
|
borderBottomLeftRadius: '4px !important',
|
||||||
borderBottomRightRadius: '4px !important',
|
borderBottomRightRadius: '4px !important',
|
||||||
|
boxShadow,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
indicatorContainer: base => ({ ...base, padding: 0, paddingRight: theme.spaces[3] }),
|
indicatorContainer: base => ({ ...base, padding: 0, paddingRight: theme.spaces[3] }),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user