ITADN

Multiple Components in a Story

#112Closedsaksben 创建于 2025-04-18
S
saksbencommented
Thanks so much for making Astrobook; it's great. This might be really simple, but is there a way to render multiple components in the same story? In Storybook, I could have this in the tsx's story, and it would render a ul with 3 Li's: ``` import List from './ul.astro' import Li from './li.astro' export default { component: List, } export const Default = ({...args}) => { const logic = "First" return ( <List> <Li title={logic} {...args} /> <Li title="Second" {...args} /> <Li title="Third" {...args} /> </List> ) } ``` But it looks like with Astrobook I can only render 1 component per story tsx (like if it was just the List component), right?
关闭于 2025-04-18 2 条评论