Skip to content

Commit

Permalink
Replace static CSS class with a data attribute on Preview (#344)
Browse files Browse the repository at this point in the history
Fix #334
  • Loading branch information
n1313 authored and sapegin committed Mar 6, 2017
1 parent 5f88bb3 commit 556a5d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/rsg-components/Playground/PlaygroundRenderer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { PropTypes } from 'react';
import cx from 'classnames';
import Editor from 'rsg-components/Editor';
import Link from 'rsg-components/Link';
import Preview from 'rsg-components/Preview';
Expand Down Expand Up @@ -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 ? name : ''}>
<div className={classes.isolatedLink}>
{name && (
isolatedExample ? (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exports[`test renderer should render preview 1`] = `
<div>
<div
className="rsg--example-preview">
data-preview="name">
<div>
<_class
href="#!/name/0">
Expand Down

0 comments on commit 556a5d8

Please sign in to comment.