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

usage section should show LivePreview or CodeBlock #3452

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adids1221
Copy link
Contributor

Description

Docs - Usage section, should show live playground or code block.
If the component is part of the ReactLiveScope we should show live playground else code block.

Changelog

Docs - Usage section, should show live playground or code block.

Additional info

None

if (component.snippet) {
return (
return componentLivePlaygroundSupport ? (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simplify: return componentLivePlaygroundSupport ? <UILivePreview code={code}/> : <CodeBlock language="jsx">{code}</CodeBlock>;

@Inbal-Tish
Copy link
Collaborator

Inbal-Tish commented Dec 12, 2024

@adids1221 Is this PR ready for review? I see I'm a reviewer but it's still on draft and I'm not assigned to it... Anyways wrote a small comment

@adids1221
Copy link
Contributor Author

@Inbal-Tish I'll ask Miki first about it, after that I'll the PR will be ready for review.

@M-i-k-e-l WDYT about this PR?
Since we've wrapped some snippet's with function and added some states according to the props.
Instead of wrapping it in a function let the user add the props.
Then we can this PR, if the ReactLiveScope has the component then the live play ground should be supported.

@adids1221 adids1221 marked this pull request as ready for review December 16, 2024 13:39
@adids1221 adids1221 requested a review from Inbal-Tish December 16, 2024 13:39
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.

2 participants