How to use the react-styleguidist/lib/client/rsg-components/Playground/Playground.propTypes function in react-styleguidist

To help you get started, we’ve selected a few react-styleguidist examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vue-styleguidist / vue-styleguidist / packages / vue-styleguidist / src / client / rsg-components / PlaygroundAsync / PlaygroundAsync.js View on Github external
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