-
Notifications
You must be signed in to change notification settings - Fork 842
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: convert forms section component docs to MDX #7440
docs: convert forms section component docs to MDX #7440
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly minor whitespace/callout title comments here
"prism-react-renderer": "^2.1.0", | ||
"prop-types": "^15.8.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[not related to this PR, just thinking out loud] It feels kinda weird that EUI has prop-types
as a peer dependency. Might be something to look into streamlining in the future 🤨
|
||
## Form control layout delimited | ||
|
||
<Badge color="warning">Building block only</Badge> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 The badge looks great!
Just curious, is there any specific reason we want to export the name for this as <Badge>
vs <EuiBadge>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it may become handy when we provide docs-specific defaults, wrappers, or just decide to use a different component down the road. Badge is fairly simple, so that's not the best example, but I wanted to create similar wrapper components for other components exposed in the MDX context to give us more control in general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense - thanks for explaining!
:::note | ||
|
||
Selected options are based on the checked = on property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:::note | |
Selected options are based on the checked = on property | |
:::note Selected options are based on the `checked = on` property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd vote to leave this one as is until we add support for markdown formatting to callout titles. Right now the inline code would be rendered as plain text. WDYT?
Co-authored-by: Cee Chen <[email protected]>
Co-authored-by: Cee Chen <[email protected]>
Co-authored-by: Cee Chen <[email protected]>
Co-authored-by: Cee Chen <[email protected]>
Co-authored-by: Cee Chen <[email protected]>
Co-authored-by: Cee Chen <[email protected]>
Co-authored-by: Cee Chen <[email protected]>
Preview staging links for this PR:
|
💚 Build Succeeded
History
cc @tkajtoch |
Co-authored-by: Cee Chen <[email protected]>
Summary
This PR converts component docs from the forms section to MDX and is a part of #7404. It also configures EUI to be used in the docusaurus theme and creates a
Badge
alias for theEuiBadge
component that's now available globally in the MDX document scope.QA