Adding the possibility to add multiple ui components in the live code editor in the docs (#2381)
* working * forgot docs folder * modify according to comments
This commit is contained in:
@ -6,11 +6,13 @@ sidebar_position: 1
|
||||
import { SandpackEditor} from '@site/src/ui/SandpackEditor'
|
||||
|
||||
<SandpackEditor
|
||||
componentPath='@/ui/Checkmark/components/Checkmark'
|
||||
availableComponentPaths={['@/ui/Checkmark/components/Checkmark', '@/ui/Button/components/Button']}
|
||||
componentCode={`import { Checkmark } from "@/ui/Checkmark/components/Checkmark";
|
||||
|
||||
import { Button } from "@/ui/Button/components/Button";
|
||||
export const MyComponent = () => {
|
||||
return <Checkmark />;
|
||||
return <><Checkmark /><Button title="New task"
|
||||
variant={'secondary'}
|
||||
onClick={() => console.log('click')}/></>
|
||||
}
|
||||
`}
|
||||
/>
|
||||
Reference in New Issue
Block a user