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

Code examples in documentation #145

Open
faraazahmad opened this issue May 24, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@faraazahmad
Copy link

commented May 24, 2018

It would be nice to have code examples in the documentation for the props, as sometimes it can be hard to tell how to use a component and its props (especially for beginners)

@mischnic

This comment has been minimized.

Copy link
Contributor

commented May 24, 2018

So you mean:

          <RadioButtons selected={1} onSelect={v => console.log(`option no. ${v} got selected`)}>
            <RadioButtons.Item>Option 1</RadioButtons.Item>
            <RadioButtons.Item>Option 2</RadioButtons.Item>
          </RadioButtons>

instead of

          <RadioButtons>
            <RadioButtons.Item>Option 1</RadioButtons.Item>
            <RadioButtons.Item>Option 2</RadioButtons.Item>
          </RadioButtons>
@faraazahmad

This comment has been minimized.

Copy link
Author

commented May 24, 2018

Yeah something like that. Also, I was thinking to show separate examples for each prop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.