-
Notifications
You must be signed in to change notification settings - Fork 735
LivePreview - fix UI #3667
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
LivePreview - fix UI #3667
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.
Pull Request Overview
This PR updates the UI for LivePreview by renaming a component and refining how the SectionHeader component renders its usage title.
- Renames the default function in livePreview.tsx from UILivePreview to LivePreviewWrapper.
- Updates SectionHeader.tsx to dynamically display either "Playground" or "Usage" based on component support.
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
docuilib/src/pages/livePreview.tsx | Renamed the default export to LivePreviewWrapper. |
docuilib/src/components/pageComponents/SectionHeader.tsx | Added logic using isComponentSupported to choose the usage title and reordered stylesheet import. |
Files not reviewed (1)
- docuilib/src/components/UILivePreview.module.scss: Language not supported
Comments suppressed due to low confidence (2)
docuilib/src/pages/livePreview.tsx:7
- [nitpick] The function name 'LivePreviewWrapper' might not clearly convey its role compared to the file name 'livePreview.tsx'. Consider renaming it to better align with the file's context.
export default function LivePreviewWrapper() {
docuilib/src/components/pageComponents/SectionHeader.tsx:31
- [nitpick] The local variable 'title' in getUsageTitle may cause confusion by shadowing the 'title' property from 'section'. Consider renaming it to 'usageTitle' for clarity.
const title = isComponentSupported(component.name) ? 'Playground' : 'Usage';
Description
LivePreview - fix UI
Changelog
LivePreview - fix UI
Additional info