Skip to content

[WIP] Component Playground#624

Open
NyxCode wants to merge 4 commits into
carbon-design-system:masterfrom
NyxCode:playground
Open

[WIP] Component Playground#624
NyxCode wants to merge 4 commits into
carbon-design-system:masterfrom
NyxCode:playground

Conversation

@NyxCode

@NyxCode NyxCode commented May 4, 2021

Copy link
Copy Markdown

Right now, the docs contain a separate example for every prop.
Vuetify, for example, has a nice playground where one can directly interact with the components in the documentation.

What I've got so far looks like this:

img

The definition of this playground in Checkbox.svx looks like this:

<Playground
    component={Checkbox}
    props={{
        labelText: {
            component: "TextInput",
            props: { value: "Label text", labelText: "Label" }
        },
        checked: {
            component: "Checkbox",
            props: { labelText: "Checked" }
        },
        indeterminate: {
            component: "Checkbox",
            props: { labelText: "Indeterminate" }
        },
        hideLabel: {
            component: "Checkbox",
            props: { labelText: "Hide label" }
        },
        disabled: {
            component: "Checkbox",
            props: { labelText: "Disabled" }
        },
        skeleton: {
            component: "Checkbox",
            props: { labelText: "Skeleton" }
        },
    }} />

Feedback would be appreciated!

@vercel

vercel Bot commented May 4, 2021

Copy link
Copy Markdown

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/carbon-svelte/carbon-components-svelte/C6X2A8XSurrioWZ12RgUtW6i32QY
✅ Preview: https://carbon-compone-git-fork-nyxcode-playground-carbon-cba1c9.vercel.app

@NyxCode

NyxCode commented May 4, 2021

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant