fixed overflow bug with accordions in CM

This commit is contained in:
ronronscelestes 2021-11-02 14:40:33 +01:00
parent c08dadaa50
commit fe3f334fec
2 changed files with 12 additions and 10 deletions

View File

@ -17,17 +17,18 @@ import { getTrad } from '../../../../utils';
import FieldComponent from '../../../FieldComponent'; import FieldComponent from '../../../FieldComponent';
import Rectangle from './Rectangle'; import Rectangle from './Rectangle';
// FIXME: needed for the react-select overflow
const StyledBox = styled(Box)`
> div {
overflow: visible;
}
`;
const IconButtonCustom = styled(IconButton)` const IconButtonCustom = styled(IconButton)`
background-color: transparent; background-color: transparent;
`; `;
const StyledBox = styled(Box)`
> div {
> div:not(:first-of-type) {
overflow: visible;
}
}
`;
const Component = ({ const Component = ({
componentUid, componentUid,
index, index,
@ -76,7 +77,7 @@ const Component = ({
return ( return (
<Box> <Box>
<Rectangle /> <Rectangle />
<StyledBox shadow="tableShadow"> <StyledBox shadow="tableShadow" hasRadius>
<Accordion expanded={isOpen} toggle={() => onToggle(index)} size="S"> <Accordion expanded={isOpen} toggle={() => onToggle(index)} size="S">
<AccordionToggle <AccordionToggle
startIcon={<FontAwesomeIcon icon={icon} />} startIcon={<FontAwesomeIcon icon={icon} />}

View File

@ -21,11 +21,12 @@ import DraggingSibling from './DraggingSibling';
import { CustomIconButton, DragHandleWrapper } from './IconButtonCustoms'; import { CustomIconButton, DragHandleWrapper } from './IconButtonCustoms';
import { connect, select } from './utils'; import { connect, select } from './utils';
// FIXME: needed for the react-select overflow
const StyledBox = styled(Box)` const StyledBox = styled(Box)`
> div { > div {
> div:not(:first-of-type) {
overflow: visible; overflow: visible;
} }
}
`; `;
/* eslint-disable react/no-array-index-key */ /* eslint-disable react/no-array-index-key */