-
Notifications
You must be signed in to change notification settings - Fork 45
[WEB-4801] Add Admonition and Table MDX components #2989
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
[WEB-4801] Add Admonition and Table MDX components #2989
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
6015277 to
5c1e160
Compare
| @@ -0,0 +1,160 @@ | |||
| --- | |||
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.
This file is purely to demonstrate the new components, it will be deleted prior to merge.
| @@ -0,0 +1,124 @@ | |||
| import React from 'react'; | |||
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.
Predominantly generated by Claude but with Radix as a very close guide.
616baab to
5f97a6b
Compare
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
5f97a6b to
4d66a25
Compare
aralovelace
left a comment
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.
|
@aralovelace isn't this just a corrupted table though? There shouldn't ever be more |
aralovelace
left a comment
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.
ahh yes its just need data in the body yes looks good to me
…ragraph rendering
4d66a25 to
9368377
Compare

Human preamble
Adds the Admonition and Table components for use in MDX templates. Table replaces the previous
tables.tsxcomponent, andAdmonitionis brand new. Look at thetest-mdx-components.mdxfile for usage examples.To test, take a look at: https://ably-docs-web-4801-admo-cxtljx.herokuapp.com/docs/test-mdx-components
Admonitions on the test page:

Tables on the test page:

Summary
This PR adds two new MDX components for use in our documentation:
Changes
Admonition.tsxwith 5 color variants, optional titles, and dark mode supportTable.tsxwith composition API (Table.Root, Table.Header, Table.Body, etc.)MDXWrapper.tsxto register both new componentstables.tsxand replaced with new Table componentComponent Features
Admonition
Table
Test Plan
/docs/test-mdx-components🤖 Generated with Claude Code