Skip to content

Commit 2679e3d

Browse files
authored
docs: delete repeatable zone modal warning (#1377)
Co-authored-by: lihbr <lihbr@users.noreply.github.com>
1 parent 2d814f3 commit 2679e3d

1 file changed

Lines changed: 24 additions & 8 deletions

File tree

  • packages/slice-machine/src/legacy/lib/builders/SliceBuilder/FieldZones

packages/slice-machine/src/legacy/lib/builders/SliceBuilder/FieldZones/index.tsx

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,30 @@ const FieldZones: FC = () => {
246246
<DialogHeader icon="delete" title="Delete field" />
247247
<DialogContent>
248248
<Box padding={24} gap={12} flexDirection="column">
249-
<strong>
250-
This action will permanently remove the repeatable zone from the{" "}
251-
{slice.model.name} slice.
252-
</strong>
253-
<div>
254-
To reimplement repeatable fields later, use a group field instead
255-
of the repeatable zone.
256-
</div>
249+
{slice.model.variations.length > 1 ? (
250+
<>
251+
<strong>
252+
This action will permanently remove the repeatable zone from
253+
the {slice.model.name} slice {variation.name} variation.
254+
</strong>
255+
<div>
256+
Other variations will be left untouched. To reimplement
257+
repeatable fields later, use a group field instead of the
258+
repeatable zone.
259+
</div>
260+
</>
261+
) : (
262+
<>
263+
<strong>
264+
This action will permanently remove the repeatable zone from
265+
the {slice.model.name}.
266+
</strong>
267+
<div>
268+
To reimplement repeatable fields later, use a group field
269+
instead of the repeatable zone.
270+
</div>
271+
</>
272+
)}
257273
</Box>
258274
<DialogActions
259275
ok={{

0 commit comments

Comments
 (0)