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

docs(CodeSnippet): Update snippet docs #8242

Merged
merged 6 commits into from
Apr 6, 2021

Conversation

tw15egan
Copy link
Member

@tw15egan tw15egan commented Mar 30, 2021

Closes #8088
Refs #8181

Updates the docs so that they are more helpful

Changelog

New

  • All 3 variants are rendered in the Playground story, and you can change the content displayed in them via the knobs

Changed

  • Added the prop names to all knobs

Removed

  • Multiline story no longer spreads props so it can be copy / pasted

Testing / Reviewing

Ensure CodeSnippet stories are copy / pastable (exception of playground story) and that the prop names are added to the knobs.
Ensure you can change the content of the code snippets

@tw15egan tw15egan changed the title Update snippet docs docs(CodeSnippet): Update snippet docs Mar 30, 2021
@netlify
Copy link

netlify bot commented Mar 30, 2021

Deploy preview for carbon-elements ready!

Built with commit 3e7604c

https://deploy-preview-8242--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Mar 30, 2021

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit 3e7604c

https://deploy-preview-8242--carbon-components-react.netlify.app

@guigueb
Copy link
Contributor

guigueb commented Mar 31, 2021

Nice.
I think you missed the copyLabel prop.

And it may be hard to do - but could we get children(CodeSnippet data) to be a prop too.
With the single and multi line variants, modifying the CodeSnippet data will help test the wrapText prop and scollbar behavior.
But most of all it is needed to test the behavior of the multi line min/max - closed/expanded props.

@guigueb
Copy link
Contributor

guigueb commented Apr 1, 2021

My bad, looks like you already have the children(CodeSnippet data) as a knob prop.
I got lost looking for a prop named (children).

@tw15egan tw15egan marked this pull request as ready for review April 5, 2021 15:58
@tw15egan tw15egan requested a review from a team as a code owner April 5, 2021 15:58
@tw15egan tw15egan requested review from emyarod and dakahn April 5, 2021 15:58
@kodiakhq kodiakhq bot merged commit 4c1b7b0 into carbon-design-system:main Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CodeSnippet: Storybook needs some lovin
4 participants