Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Component Playground #624

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

NyxCode
Copy link

@NyxCode NyxCode commented May 4, 2021

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
Copy link

vercel bot commented May 4, 2021

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
Copy link
Author

NyxCode commented May 4, 2021

@metonym metonym force-pushed the master branch 2 times, most recently from e7485c4 to 417102d Compare November 8, 2023 03:27
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.

None yet

1 participant