react-shadow-root
Advanced tools
Comparing version 1.0.4 to 1.1.0
@@ -65,2 +65,3 @@ "use strict"; | ||
this.shadowRoot = _reactDom.default.findDOMNode(this).parentNode.attachShadow({ | ||
delegatesFocus: this.props.delegatesFocus, | ||
mode: this.props.mode | ||
@@ -89,2 +90,3 @@ }); | ||
_defineProperty(ShadowRoot, "propTypes", { | ||
delegatesFocus: _propTypes.default.bool, | ||
mode: _propTypes.default.oneOf(['open', 'closed']) | ||
@@ -94,3 +96,4 @@ }); | ||
_defineProperty(ShadowRoot, "defaultProps", { | ||
delegatesFocus: false, | ||
mode: 'closed' | ||
}); |
{ | ||
"name": "react-shadow-root", | ||
"version": "1.0.4", | ||
"version": "1.1.0", | ||
"description": "Adds a shadow root to React components", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -58,5 +58,6 @@ # react-shadow-root | ||
## Props | ||
| Prop | Values | Default | Description | | ||
|------|------|---------|-------------| | ||
| mode | `open` or `closed` | `closed` | Sets the mode of the shadow root | | ||
| Prop | Type | Values | Default | Description | | ||
|------|------|------|---------|-------------| | ||
| `delegatesFocus` | `Boolean` | `true` or `false` | `false` | Expands the focus behavior of elements within the shadow DOM. Click [here](https://apearce.github.io/react-shadow-root/#delegates-focus) for more information. | | ||
| `mode` | `String` | `open` or `closed` | `closed` | Sets the mode of the shadow root. | | ||
@@ -63,0 +64,0 @@ ## Notes |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
134998
130
68