How to use the react-styleguidist/lib/client/rsg-components/Playground/Playground.contextTypes 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
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

	constructor(props, context) {
		super(props, context)
		Playground.call(this, props, context)
	}

	componentWillUnmount = Playground.prototype.componentWillUnmount

	handleChange = Playground.prototype.handleChange

	handleTabChange = Playground.prototype.handleTabChange

	render() {
		return Playground.prototype.render.call(this)