docs(button): specify danger is not supported for icon only buttons#14307
Merged
Conversation
Member
Author
|
Huge thanks @jdharvey-ibm for figuring out placing the comment all onto a single line prevents prettier from malforming the .mdx file formatting! 🙏 |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
tw15egan
reviewed
Jul 26, 2023
Comment on lines
+105
to
+110
| <CodeSnippet type="inline" hideCopyButton> | ||
| {'<Modal>'} | ||
| </CodeSnippet> | ||
| /<CodeSnippet type="inline" hideCopyButton>{`<ComposedModal>`}</CodeSnippet>{' '} | ||
| has to be put at the top level in a React tree. The easiest way to ensure | ||
| that is using React portal as shown in above example. |
Contributor
There was a problem hiding this comment.
These CodeSnippet blocks seem to be causing crashes here and in ComposedModal
Member
Author
There was a problem hiding this comment.
Thanks for pointing this out. It should be fixed now.
To find valid syntax for .mdx files w/ MDX2, I've been doing the following:
- Take the erroring portions (like this snippet here) and put it into the mdx playground
- Starting at the most-nested components, reduce these down to single-line entries
- <CodeSnippet type="inline" hideCopyButton>
- {'<Modal>'}
- </CodeSnippet>
+ <CodeSnippet type="inline" hideCopyButton>{'<Modal>'}</CodeSnippet>- Continue simplifying the formatting until the compiler is successful and doesn't report errors
- Put the valid code over into the .mdx file and surround it with prettier ignore comments. These look a bit different in mdx2 and are surrounded in curly braces:
{/* <!-- prettier-ignore-start --> */}
✅ Deploy Preview for carbon-components-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
alisonjoseph
approved these changes
Jul 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #14300
Changelog
Changed
.mdxdocs that danger is not a supported option for icon only buttonsTesting / Reviewing