mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 09:25:46 +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);
|
||||
|
||||
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={
|
||||
isFieldAllowed ? (
|
||||
const accordionActions = !isFieldAllowed ? null : (
|
||||
<Stack horizontal spacing={0} expanded={isOpen}>
|
||||
<IconButtonCustom
|
||||
noBorder
|
||||
@ -183,8 +170,21 @@ const DynamicZoneComponent = ({
|
||||
<Drag />
|
||||
</IconButton>
|
||||
</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}`}
|
||||
togglePosition="left"
|
||||
/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user