Live code editor for UI docs (#2351)

* Docausaurus code live editor test

* Docusaurus sandpack test

* Fix setup

* Delete files

* Fixes

* Complete work

* Fix config

* Fix config

---------

Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
This commit is contained in:
Charles Bochet
2023-11-03 23:09:20 +01:00
committed by GitHub
parent 1ed4965a95
commit e70ef58f97
18 changed files with 4311 additions and 1670 deletions

View File

@ -1,6 +1,6 @@
{
"label": "Forms",
"position": 2,
"label": "Display",
"position": 0,
"collapsible": true,
"collapsed": true,
"customProps": {

View File

@ -0,0 +1,16 @@
---
title: Checkmark
sidebar_position: 1
---
import { SandpackEditor} from '@site/src/ui/SandpackEditor'
<SandpackEditor
componentPath='@/ui/Checkmark/components/Checkmark'
componentCode={`import { Checkmark } from "@/ui/Checkmark/components/Checkmark";
export const MyComponent = () => {
return <Checkmark />;
}
`}
/>

View File

@ -1,15 +0,0 @@
---
title: Button
sidebar_position: 1
---
import IframeResizer from 'iframe-resizer-react';
<IframeResizer
checkOrigin={false}
inPageLinks
src="https://storybook.twenty.com/iframe.html?id=ui-button-button--docs&viewMode=docs&singleStory=true"
style={{ width: '1px', minWidth: '100%'}}
/>

View File

@ -2,6 +2,3 @@
title: Overview
sidebar_position: 0
---
import DocCardList from '@theme/DocCardList';
<DocCardList />