22import AccentBorderLeftList from ' @components/List/layouts/AccentBorderLeftList.astro'
33import BadgeList from ' @components/List/layouts/BadgeList.astro'
44import CardGridList from ' @components/List/layouts/CardGridList.astro'
5+ import ChatBubbles from ' @components/List/layouts/ChatBubbles.astro'
56import CheckIconsList from ' @components/List/layouts/CheckIconsList.astro'
67import ChevronList from ' @components/List/layouts/ChevronList.astro'
78import ColoredMarkerList from ' @components/List/layouts/ColoredMarkerList.astro'
@@ -37,14 +38,15 @@ export type Props = {
3738 text? : string
3839 wrapper? : string
3940 }
40- size? : number
41+ size? : number | ' lg ' | ' xl ' | ' 2xl '
4142 variant: string
4243 style? : Record <string , unknown >
4344}
4445
4546const { items, size, variant = ' default' , classes, style } = Astro .props
4647const classesProps = classes ? { classes } : {}
47- const sizeProps = size !== undefined ? { size } : {}
48+ const numericSizeProps = typeof size === ' number' ? { size } : {}
49+ const chatBubbleSizeProps = typeof size === ' string' ? { size } : {}
4850const styleProps = style ? { style } : {}
4951const itemsWithColor = items as Array <{
5052 title? : string
@@ -71,15 +73,16 @@ const plainIconItems = items.filter((item): item is Props['items'][number] & { i
7173 { variant === ' accent-border-left-list' && <AccentBorderLeftList items = { items } { ... classesProps } { ... styleProps } />}
7274 { variant === ' badge-list' && <BadgeList items = { items } { ... classesProps } { ... styleProps } />}
7375 { variant === ' card-grid-list' && <CardGridList items = { items } { ... classesProps } { ... styleProps } />}
76+ { variant === ' chat-bubbles' && <ChatBubbles items = { items } { ... classesProps } { ... chatBubbleSizeProps } />}
7477 { variant === ' check-icons-list' && <CheckIconsList items = { items } { ... classesProps } { ... styleProps } />}
7578 { variant === ' chevron-list' && <ChevronList items = { items } { ... classesProps } { ... styleProps } />}
76- { variant === ' colored-marker-list' && <ColoredMarkerList items = { itemsWithColor } { ... classesProps } { ... sizeProps } { ... styleProps } />}
79+ { variant === ' colored-marker-list' && <ColoredMarkerList items = { itemsWithColor } { ... classesProps } { ... numericSizeProps } { ... styleProps } />}
7780 { variant === ' numbered-with-background-list' && <NumberedWithBackgroundList items = { items } { ... classesProps } { ... styleProps } />}
78- { variant === ' plain-icon-list' && <PlainIconList items = { plainIconItems } { ... classesProps } { ... sizeProps } { ... styleProps } />}
81+ { variant === ' plain-icon-list' && <PlainIconList items = { plainIconItems } { ... classesProps } { ... numericSizeProps } { ... styleProps } />}
7982 { variant === ' side-by-side-list' && <SideBySideList items = { items } { ... classesProps } { ... styleProps } />}
8083 { variant === ' timeline-list' && <TimelineList items = { items } { ... classesProps } { ... styleProps } />}
81- { variant === ' two-column-check-icons-list' && <TwoColumnCheckIconsList items = { items } { ... classesProps } { ... sizeProps } { ... styleProps } />}
82- { variant === ' two-column-icon-list' && <TwoColumnIconList items = { itemsWithIconAndColor } { ... classesProps } { ... sizeProps } { ... styleProps } />}
83- { variant === ' three-column-icon-list' && <ThreeColumnIconList items = { itemsWithIconAndColor } { ... classesProps } { ... sizeProps } { ... styleProps } />}
84+ { variant === ' two-column-check-icons-list' && <TwoColumnCheckIconsList items = { items } { ... classesProps } { ... numericSizeProps } { ... styleProps } />}
85+ { variant === ' two-column-icon-list' && <TwoColumnIconList items = { itemsWithIconAndColor } { ... classesProps } { ... numericSizeProps } { ... styleProps } />}
86+ { variant === ' three-column-icon-list' && <ThreeColumnIconList items = { itemsWithIconAndColor } { ... classesProps } { ... numericSizeProps } { ... styleProps } />}
8487 { variant === ' zebra-list' && <ZebraList items = { items } { ... classesProps } { ... styleProps } />}
8588</div >
0 commit comments