react-twemoji
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -23,3 +23,3 @@ "use strict"; | ||
noWrapper: true | ||
}, _react["default"].createElement("p", null, "\uD83D\uDE09", _react["default"].createElement("a", null, "\uD83D\uDE0A"))))); | ||
}, "\uD83D\uDE09", _react["default"].createElement("p", null, "\uD83D\uDE09", _react["default"].createElement("a", null, "\uD83D\uDE0A"))))); | ||
} | ||
@@ -26,0 +26,0 @@ |
@@ -106,2 +106,8 @@ "use strict"; | ||
return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].Children.map(children, function (c, i) { | ||
if (typeof c === 'string') { | ||
// eslint-disable-next-line no-console | ||
console.warn("Twemoji can't parse string child when noWrapper is set. Skipping child \"".concat(c, "\"")); | ||
return c; | ||
} | ||
_this2.childrenRefs[i] = _this2.childrenRefs[i] || _react["default"].createRef(); | ||
@@ -108,0 +114,0 @@ return _react["default"].cloneElement(c, { |
{ | ||
"name": "react-twemoji", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A React wrapper for Twemoji", | ||
@@ -5,0 +5,0 @@ "keyword": [ |
@@ -47,3 +47,3 @@ # react-twemoji | ||
| `options` | `Object` | `{}` | `twemoji.parse` options | | ||
| `noWrapper` | `Boolean` | `false` | When it is `true`, Twemoji will not render a wrapping `div` to contain children | | ||
| `noWrapper` | `Boolean` | `false` | When it is `true`, `Twemoji` will not render a wrapping `div` to contain children. Note that since `twemoji.parse` needs an DOM element reference, any direct pure text child of `Twemoji` is not parsed when `noWrapper` is `true`. E.g. `foo` in `<Twemoji noWrapper={true}>foo<p>bar</p></Twmoji>` is not parsed. | | ||
@@ -50,0 +50,0 @@ ### Run example |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
334047
174