UNPKG

react-layer-stack

Version:

Simple but ubiquitously powerful and agnostic layering system for React. Useful for any kind of windowing/popover/modals/tooltip application

18 lines (15 loc) 381 B
import React, { Component, Children } from 'react'; import LayerStore from './../LayerStore' export default class LayerStackProvider extends Component { getChildContext() { return { layerStore: new LayerStore() } } render() { return Children.only(this.props.children) } } LayerStackProvider.childContextTypes = { layerStore: React.PropTypes.object };