Fix select styles

Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
soupette 2020-07-03 16:50:17 +02:00 committed by Alexandre Bodin
parent 842f78d5fe
commit b847ffff52
3 changed files with 14 additions and 0 deletions

View File

@ -52,6 +52,7 @@ const selectStyle = {
} = state;
let border;
let borderBottom;
if (state.isFocused) {
border = '1px solid #78caff !important';
@ -61,6 +62,10 @@ const selectStyle = {
border = '1px solid #e3e9f3 !important';
}
if (state.menuIsOpen === true) {
borderBottom = '1px solid #e3e9f3 !important';
}
return {
...base,
fontSize: 13,
@ -70,6 +75,7 @@ const selectStyle = {
boxShadow: 0,
borderRadius: '2px !important',
...borderRadiusStyle,
borderBottom,
};
},
valueContainer: base => ({

View File

@ -15,6 +15,7 @@ const styles = {
} = state;
let border;
let borderBottom;
if (state.isFocused) {
border = '1px solid #78caff !important';
@ -24,6 +25,10 @@ const styles = {
border = '1px solid #e3e9f3 !important';
}
if (state.menuIsOpen === true) {
borderBottom = '1px solid #e3e9f3 !important';
}
return {
...base,
fontSize: 13,
@ -33,6 +38,7 @@ const styles = {
boxShadow: 0,
borderRadius: '2px !important',
...borderRadiusStyle,
borderBottom,
};
},
menu: base => {
@ -53,6 +59,7 @@ const styles = {
menuList: base => ({
...base,
maxHeight: '112px',
paddingTop: 2,
}),
option: (base, state) => {
return {

View File

@ -204,6 +204,7 @@ describe('ADMIN | COMPONENTS | USER | SelectRoles | utils | styles', () => {
const expected = {
ok: true,
maxHeight: '112px',
paddingTop: 2,
};
expect(styles.menuList(base)).toEqual(expected);