Merge pull request #13695 from strapi/ML-folder/SelectTree-box-shadow

[ML Folder] SelectTree box shadow
This commit is contained in:
Gustav Hansen 2022-07-06 09:23:24 +02:00 committed by GitHub
commit d5b9f14b61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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] }),