Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Component } from 'react'
import { polyfill } from 'react-lifecycles-compat'
import PropTypes from 'prop-types'
import Playground from 'react-styleguidist/lib/client/rsg-components/Playground/Playground'
class PlaygroundAsync extends Component {
static propTypes = {
...Playground.propTypes,
code: PropTypes.shape({
raw: PropTypes.string.isRequired,
compiled: PropTypes.oneOfType([
PropTypes.shape({
script: PropTypes.string,
template: PropTypes.string,
style: PropTypes.string
}),
PropTypes.bool
])
}).isRequired
}
static contextTypes = Playground.contextTypes
static getDerivedStateFromProps = Playground.getDerivedStateFromProps