mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
feat: adjust filter chips styling (#5638)
This commit is contained in:
parent
e6442d9304
commit
176e22ed40
@ -6,8 +6,8 @@ import { styled } from '@mui/material';
|
|||||||
import { Add } from '@mui/icons-material';
|
import { Add } from '@mui/icons-material';
|
||||||
|
|
||||||
const StyledButton = styled(Button)(({ theme }) => ({
|
const StyledButton = styled(Button)(({ theme }) => ({
|
||||||
margin: theme.spacing(-1, 0, -1, 0),
|
padding: theme.spacing(0, 1.25, 0, 1.25),
|
||||||
padding: theme.spacing(1.25),
|
height: theme.spacing(3.75),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
interface IAddFilterButtonProps {
|
interface IAddFilterButtonProps {
|
||||||
|
@ -17,6 +17,7 @@ const StyledChip = styled(
|
|||||||
borderRadius: `${theme.shape.borderRadius}px`,
|
borderRadius: `${theme.shape.borderRadius}px`,
|
||||||
padding: 0,
|
padding: 0,
|
||||||
fontSize: theme.typography.body2.fontSize,
|
fontSize: theme.typography.body2.fontSize,
|
||||||
|
height: 'auto',
|
||||||
...(isActive
|
...(isActive
|
||||||
? {
|
? {
|
||||||
backgroundColor: theme.palette.secondary.light,
|
backgroundColor: theme.palette.secondary.light,
|
||||||
@ -32,13 +33,13 @@ const StyledLabel = styled('div')(({ theme }) => ({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
const StyledCategoryIconWrapper = styled('div')(({ theme }) => ({
|
const StyledCategoryIconWrapper = styled('div')(({ theme }) => ({
|
||||||
marginRight: theme.spacing(1),
|
marginRight: theme.spacing(0.5),
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
fontSize: theme.typography.h2.fontSize,
|
fontSize: theme.spacing(2),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const StyledOptions = styled('span')(({ theme }) => ({
|
const StyledOptions = styled('button')(({ theme }) => ({
|
||||||
color: theme.palette.text.primary,
|
color: theme.palette.text.primary,
|
||||||
fontWeight: theme.typography.fontWeightRegular,
|
fontWeight: theme.typography.fontWeightRegular,
|
||||||
textOverflow: 'ellipsis',
|
textOverflow: 'ellipsis',
|
||||||
@ -48,6 +49,13 @@ const StyledOptions = styled('span')(({ theme }) => ({
|
|||||||
[theme.breakpoints.up('md')]: {
|
[theme.breakpoints.up('md')]: {
|
||||||
maxWidth: '800px',
|
maxWidth: '800px',
|
||||||
},
|
},
|
||||||
|
border: 'none',
|
||||||
|
cursor: 'pointer',
|
||||||
|
backgroundColor: 'transparent',
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: theme.palette.action.hover,
|
||||||
|
},
|
||||||
|
height: theme.spacing(3),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const StyledIconButton = styled(IconButton)(({ theme }) => ({
|
const StyledIconButton = styled(IconButton)(({ theme }) => ({
|
||||||
|
@ -11,16 +11,17 @@ const StyledOperator = styled('button')(({ theme }) => ({
|
|||||||
borderRadius: 0,
|
borderRadius: 0,
|
||||||
border: 'none',
|
border: 'none',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
color: theme.palette.text.disabled,
|
color: theme.palette.text.secondary,
|
||||||
fontSize: theme.typography.body2.fontSize,
|
fontSize: theme.typography.body2.fontSize,
|
||||||
padding: theme.spacing(0, 0.75),
|
padding: theme.spacing(0, 0.75),
|
||||||
margin: theme.spacing(0, 0.75),
|
margin: theme.spacing(0, 0, 0, 0.75),
|
||||||
height: theme.spacing(3.75),
|
height: theme.spacing(3),
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
backgroundColor: theme.palette.action.hover,
|
backgroundColor: theme.palette.action.hover,
|
||||||
|
color: theme.palette.text.primary,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import { FilterItem, FilterItemParams } from '../FilterItem/FilterItem';
|
|||||||
|
|
||||||
const StyledBox = styled(Box)(({ theme }) => ({
|
const StyledBox = styled(Box)(({ theme }) => ({
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
padding: theme.spacing(2, 3),
|
padding: theme.spacing(1.5, 3),
|
||||||
gap: theme.spacing(1),
|
gap: theme.spacing(1),
|
||||||
flexWrap: 'wrap',
|
flexWrap: 'wrap',
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user