-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Replace static CSS class with a data attribute on Preview #344
Conversation
Codecov Report
@@ Coverage Diff @@
## next #344 +/- ##
=======================================
Coverage 94.77% 94.77%
=======================================
Files 75 75
Lines 995 995
Branches 202 202
=======================================
Hits 943 943
Misses 52 52
Continue to review full report at Codecov.
|
@@ -75,7 +74,7 @@ export function PlaygroundRenderer({ | |||
}) { | |||
return ( | |||
<div className={classes.root}> | |||
<div className={cx(classes.preview, 'rsg--example-preview')}> | |||
<div className={classes.preview} data-preview={name}> | |||
<div className={classes.isolatedLink}> | |||
{name && ( |
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.
Looks like name
can be empty but I’m not sure why. Maybe we can remove this condition ;-)
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.
Maybe we can, but that's out of scope of this PR :)
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.
Then you need to handle case when name is not there ;-)
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.
Ah, now I see what you are talking about. OK!
If |
Thanks! |
Fixes #334