1- import { ActionList , ActionListItem , Box } from "@prismicio/editor-ui" ;
2- import { FC } from "react" ;
3-
41import {
2+ ActionList ,
3+ ActionListItem ,
54 BlankSlate ,
65 BlankSlateActions ,
7- BlankSlateContent ,
86 BlankSlateDescription ,
7+ BlankSlateIcon ,
98 BlankSlateTitle ,
10- } from "@/components/BlankSlate" ;
9+ } from "@prismicio/editor-ui" ;
10+ import { FC } from "react" ;
11+
1112import { useAiSliceGenerationExperiment } from "@/features/builder/useAiSliceGenerationExperiment" ;
12- import { SliceMachinePrinterIcon } from "@/icons/SliceMachinePrinterIcon" ;
1313
1414export type SliceZoneBlankSlateProps = {
1515 openUpdateSliceZoneModal : ( ) => void ;
@@ -31,62 +31,56 @@ export const SliceZoneBlankSlate: FC<SliceZoneBlankSlateProps> = ({
3131 const aiSliceGenerationExperiment = useAiSliceGenerationExperiment ( ) ;
3232
3333 return (
34- < Box
35- flexGrow = { 1 }
36- justifyContent = "center"
37- data-testid = "slice-zone-blank-slate"
38- >
39- < BlankSlate backgroundImage = "/blank-slate-slice-zone.png" >
40- < BlankSlateContent >
41- < Box justifyContent = "center" padding = { { bottom : 16 } } >
42- < SliceMachinePrinterIcon />
43- </ Box >
44- < BlankSlateTitle > Add slices</ BlankSlateTitle >
45- < BlankSlateDescription >
46- Slices are website sections that you can reuse on different pages
47- with different content. Each slice has its own component in your
48- code.
49- </ BlankSlateDescription >
50- < BlankSlateActions >
51- < ActionList >
52- { aiSliceGenerationExperiment . eligible && (
53- < ActionListItem
54- startIcon = "autoFixHigh"
55- onClick = { openGenerateSliceWithAiModal }
56- description = "Let AI instantly create a Slice for you."
57- >
58- Generate with AI
59- </ ActionListItem >
60- ) }
61- < ActionListItem
62- startIcon = "add"
63- onClick = { openCreateSliceModal }
64- description = "Build a custom Slice your way."
65- >
66- Start from scratch
67- </ ActionListItem >
68- { isSlicesTemplatesSupported ? (
69- < ActionListItem
70- startIcon = "contentCopy"
71- onClick = { openSlicesTemplatesModal }
72- description = "Select from premade examples."
73- >
74- Use template
75- </ ActionListItem >
76- ) : undefined }
77- { projectHasAvailableSlices ? (
78- < ActionListItem
79- startIcon = "folder"
80- onClick = { openUpdateSliceZoneModal }
81- description = "Select from your own slices."
82- >
83- Select existing
84- </ ActionListItem >
85- ) : undefined }
86- </ ActionList >
87- </ BlankSlateActions >
88- </ BlankSlateContent >
89- </ BlankSlate >
90- </ Box >
34+ < BlankSlate data-testid = "slice-zone-blank-slate" sx = { { width : 648 } } >
35+ < BlankSlateIcon
36+ lineColor = "purple9"
37+ backgroundColor = "purple5"
38+ name = "add"
39+ size = "large"
40+ />
41+ < BlankSlateTitle size = "big" > Add slices</ BlankSlateTitle >
42+ < BlankSlateDescription >
43+ Slices are website sections that you can reuse on different pages with
44+ different content. Each slice has its own component in your code.
45+ </ BlankSlateDescription >
46+ < BlankSlateActions >
47+ < ActionList >
48+ { aiSliceGenerationExperiment . eligible && (
49+ < ActionListItem
50+ startIcon = "autoFixHigh"
51+ onClick = { openGenerateSliceWithAiModal }
52+ description = "Let AI instantly create a Slice for you."
53+ >
54+ Generate with AI
55+ </ ActionListItem >
56+ ) }
57+ < ActionListItem
58+ startIcon = "add"
59+ onClick = { openCreateSliceModal }
60+ description = "Build a custom Slice your way."
61+ >
62+ Start from scratch
63+ </ ActionListItem >
64+ { isSlicesTemplatesSupported && (
65+ < ActionListItem
66+ startIcon = "contentCopy"
67+ onClick = { openSlicesTemplatesModal }
68+ description = "Choose from ready-made examples."
69+ >
70+ Use a template
71+ </ ActionListItem >
72+ ) }
73+ { projectHasAvailableSlices && (
74+ < ActionListItem
75+ startIcon = "folder"
76+ onClick = { openUpdateSliceZoneModal }
77+ description = "Select from your created Slices."
78+ >
79+ Reuse an existing Slice
80+ </ ActionListItem >
81+ ) }
82+ </ ActionList >
83+ </ BlankSlateActions >
84+ </ BlankSlate >
9185 ) ;
9286} ;
0 commit comments