mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 08:52:26 +00:00
chore: tweak action placement
This commit is contained in:
parent
968aec8a11
commit
b041dcb8c4
@ -138,20 +138,7 @@ const DynamicZoneComponent = ({
|
|||||||
|
|
||||||
const composedBoxRefs = composeRefs(boxRef, dropRef);
|
const composedBoxRefs = composeRefs(boxRef, dropRef);
|
||||||
|
|
||||||
return (
|
const accordionActions = !isFieldAllowed ? null : (
|
||||||
<ComponentContainer as="li">
|
|
||||||
<Flex justifyContent="center">
|
|
||||||
<Rectangle background="neutral200" />
|
|
||||||
</Flex>
|
|
||||||
<StyledBox ref={composedBoxRefs} hasRadius>
|
|
||||||
{isDragging ? (
|
|
||||||
<Preview ref={dragPreviewRef} padding={6} background="primary100" />
|
|
||||||
) : (
|
|
||||||
<Accordion expanded={isOpen} onToggle={handleToggle} size="S" error={errorMessage}>
|
|
||||||
<AccordionToggle
|
|
||||||
startIcon={<FontAwesomeIcon icon={icon} />}
|
|
||||||
action={
|
|
||||||
isFieldAllowed ? (
|
|
||||||
<Stack horizontal spacing={0} expanded={isOpen}>
|
<Stack horizontal spacing={0} expanded={isOpen}>
|
||||||
<IconButtonCustom
|
<IconButtonCustom
|
||||||
noBorder
|
noBorder
|
||||||
@ -183,8 +170,21 @@ const DynamicZoneComponent = ({
|
|||||||
<Drag />
|
<Drag />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Stack>
|
</Stack>
|
||||||
) : null
|
);
|
||||||
}
|
|
||||||
|
return (
|
||||||
|
<ComponentContainer as="li">
|
||||||
|
<Flex justifyContent="center">
|
||||||
|
<Rectangle background="neutral200" />
|
||||||
|
</Flex>
|
||||||
|
<StyledBox ref={composedBoxRefs} hasRadius>
|
||||||
|
{isDragging ? (
|
||||||
|
<Preview ref={dragPreviewRef} padding={6} background="primary100" />
|
||||||
|
) : (
|
||||||
|
<Accordion expanded={isOpen} onToggle={handleToggle} size="S" error={errorMessage}>
|
||||||
|
<AccordionToggle
|
||||||
|
startIcon={<FontAwesomeIcon icon={icon} />}
|
||||||
|
action={accordionActions}
|
||||||
title={`${friendlyName}${mainValue}`}
|
title={`${friendlyName}${mainValue}`}
|
||||||
togglePosition="left"
|
togglePosition="left"
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user