File tree Expand file tree Collapse file tree
packages/slice-machine/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { Box } from "@prismicio/editor-ui" ;
1+ import { Box , ScrollArea } from "@prismicio/editor-ui" ;
22
33import { SharedSliceCard } from "@/features/slices/sliceCards/SharedSliceCard" ;
44import { ComponentUI } from "@/legacy/lib/models/common/ComponentUI" ;
@@ -34,32 +34,34 @@ export function LocalSlicesTab(props: LocalSlicesTabProps) {
3434 }
3535
3636 return (
37- < Box
38- display = "grid"
39- gridTemplateColumns = "1fr 1fr 1fr"
40- gap = { 16 }
41- flexGrow = { 1 }
42- padding = { 16 }
43- minHeight = { 0 }
44- >
45- { availableSlices . map ( ( slice ) => {
46- const isSelected = selectedLocalSlices . some (
47- ( s ) => s . model . id === slice . model . id ,
48- ) ;
49- return (
50- < SharedSliceCard
51- key = { `${ slice . from } -${ slice . model . name } ` }
52- action = { { type : "checkbox" } }
53- mode = "selection"
54- onSelectedChange = { ( ) => {
55- toggleLocalSlice ( slice ) ;
56- } }
57- selected = { isSelected }
58- slice = { slice }
59- variant = "outlined"
60- />
61- ) ;
62- } ) }
63- </ Box >
37+ < ScrollArea stableScrollbar = { false } >
38+ < Box
39+ display = "grid"
40+ gridTemplateColumns = "1fr 1fr 1fr"
41+ gap = { 16 }
42+ flexGrow = { 1 }
43+ padding = { 16 }
44+ minHeight = { 0 }
45+ >
46+ { availableSlices . map ( ( slice ) => {
47+ const isSelected = selectedLocalSlices . some (
48+ ( s ) => s . model . id === slice . model . id ,
49+ ) ;
50+ return (
51+ < SharedSliceCard
52+ key = { `${ slice . from } -${ slice . model . name } ` }
53+ action = { { type : "checkbox" } }
54+ mode = "selection"
55+ onSelectedChange = { ( ) => {
56+ toggleLocalSlice ( slice ) ;
57+ } }
58+ selected = { isSelected }
59+ slice = { slice }
60+ variant = "outlined"
61+ />
62+ ) ;
63+ } ) }
64+ </ Box >
65+ </ ScrollArea >
6466 ) ;
6567}
You can’t perform that action at this time.
0 commit comments