@remirror/react-renderer
Advanced tools
Comparing version
# @remirror/react-renderer | ||
## 1.0.3 | ||
> 2021-08-17 | ||
### Patch Changes | ||
- [#1067](https://github.com/remirror/remirror/pull/1067) [`18c101a20`](https://github.com/remirror/remirror/commit/18c101a206ba38cc935caef955f82bd16f73a551) Thanks [@whawker](https://github.com/whawker)! - Add support for callouts with emojis to the react-renderer | ||
## 1.0.2 | ||
@@ -4,0 +12,0 @@ |
@@ -26,7 +26,25 @@ 'use strict'; | ||
}); | ||
var calloutType = (_props$node$attrs = props.node.attrs) === null || _props$node$attrs === void 0 ? void 0 : _props$node$attrs.type; | ||
return /*#__PURE__*/jsxRuntime.jsx("div", { | ||
"data-callout-type": calloutType, | ||
children: children | ||
}); | ||
var _ref = (_props$node$attrs = props.node.attrs) !== null && _props$node$attrs !== void 0 ? _props$node$attrs : {}, | ||
type = _ref.type, | ||
emoji = _ref.emoji; | ||
var dataAttrs = { | ||
'data-callout-type': type | ||
}; | ||
if (emoji) { | ||
dataAttrs['data-callout-emoji'] = emoji; | ||
} | ||
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({}, dataAttrs), {}, { | ||
children: [emoji && /*#__PURE__*/jsxRuntime.jsx("div", { | ||
className: "remirror-callout-emoji-wrapper", | ||
children: /*#__PURE__*/jsxRuntime.jsx("span", { | ||
children: emoji | ||
}) | ||
}), /*#__PURE__*/jsxRuntime.jsx("div", { | ||
children: children | ||
})] | ||
})); | ||
}; | ||
@@ -33,0 +51,0 @@ |
@@ -6,3 +6,3 @@ import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2'; | ||
import _createForOfIteratorHelper from '@babel/runtime/helpers/esm/createForOfIteratorHelper'; | ||
import { jsx } from 'react/jsx-runtime'; | ||
import { jsx, jsxs } from 'react/jsx-runtime'; | ||
@@ -23,7 +23,25 @@ var Callout = props => { | ||
}); | ||
var calloutType = (_props$node$attrs = props.node.attrs) === null || _props$node$attrs === void 0 ? void 0 : _props$node$attrs.type; | ||
return /*#__PURE__*/jsx("div", { | ||
"data-callout-type": calloutType, | ||
children: children | ||
}); | ||
var _ref = (_props$node$attrs = props.node.attrs) !== null && _props$node$attrs !== void 0 ? _props$node$attrs : {}, | ||
type = _ref.type, | ||
emoji = _ref.emoji; | ||
var dataAttrs = { | ||
'data-callout-type': type | ||
}; | ||
if (emoji) { | ||
dataAttrs['data-callout-emoji'] = emoji; | ||
} | ||
return /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({}, dataAttrs), {}, { | ||
children: [emoji && /*#__PURE__*/jsx("div", { | ||
className: "remirror-callout-emoji-wrapper", | ||
children: /*#__PURE__*/jsx("span", { | ||
children: emoji | ||
}) | ||
}), /*#__PURE__*/jsx("div", { | ||
children: children | ||
})] | ||
})); | ||
}; | ||
@@ -30,0 +48,0 @@ |
@@ -26,7 +26,25 @@ 'use strict'; | ||
}); | ||
var calloutType = (_props$node$attrs = props.node.attrs) === null || _props$node$attrs === void 0 ? void 0 : _props$node$attrs.type; | ||
return /*#__PURE__*/jsxRuntime.jsx("div", { | ||
"data-callout-type": calloutType, | ||
children: children | ||
}); | ||
var _ref = (_props$node$attrs = props.node.attrs) !== null && _props$node$attrs !== void 0 ? _props$node$attrs : {}, | ||
type = _ref.type, | ||
emoji = _ref.emoji; | ||
var dataAttrs = { | ||
'data-callout-type': type | ||
}; | ||
if (emoji) { | ||
dataAttrs['data-callout-emoji'] = emoji; | ||
} | ||
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({}, dataAttrs), {}, { | ||
children: [emoji && /*#__PURE__*/jsxRuntime.jsx("div", { | ||
className: "remirror-callout-emoji-wrapper", | ||
children: /*#__PURE__*/jsxRuntime.jsx("span", { | ||
children: emoji | ||
}) | ||
}), /*#__PURE__*/jsxRuntime.jsx("div", { | ||
children: children | ||
})] | ||
})); | ||
}; | ||
@@ -33,0 +51,0 @@ |
@@ -26,7 +26,25 @@ 'use strict'; | ||
}); | ||
var calloutType = (_props$node$attrs = props.node.attrs) === null || _props$node$attrs === void 0 ? void 0 : _props$node$attrs.type; | ||
return /*#__PURE__*/jsxRuntime.jsx("div", { | ||
"data-callout-type": calloutType, | ||
children: children | ||
}); | ||
var _ref = (_props$node$attrs = props.node.attrs) !== null && _props$node$attrs !== void 0 ? _props$node$attrs : {}, | ||
type = _ref.type, | ||
emoji = _ref.emoji; | ||
var dataAttrs = { | ||
'data-callout-type': type | ||
}; | ||
if (emoji) { | ||
dataAttrs['data-callout-emoji'] = emoji; | ||
} | ||
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({}, dataAttrs), {}, { | ||
children: [emoji && /*#__PURE__*/jsxRuntime.jsx("div", { | ||
className: "remirror-callout-emoji-wrapper", | ||
children: /*#__PURE__*/jsxRuntime.jsx("span", { | ||
children: emoji | ||
}) | ||
}), /*#__PURE__*/jsxRuntime.jsx("div", { | ||
children: children | ||
})] | ||
})); | ||
}; | ||
@@ -33,0 +51,0 @@ |
@@ -6,3 +6,3 @@ import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2'; | ||
import _createForOfIteratorHelper from '@babel/runtime/helpers/esm/createForOfIteratorHelper'; | ||
import { jsx } from 'react/jsx-runtime'; | ||
import { jsx, jsxs } from 'react/jsx-runtime'; | ||
@@ -23,7 +23,25 @@ var Callout = props => { | ||
}); | ||
var calloutType = (_props$node$attrs = props.node.attrs) === null || _props$node$attrs === void 0 ? void 0 : _props$node$attrs.type; | ||
return /*#__PURE__*/jsx("div", { | ||
"data-callout-type": calloutType, | ||
children: children | ||
}); | ||
var _ref = (_props$node$attrs = props.node.attrs) !== null && _props$node$attrs !== void 0 ? _props$node$attrs : {}, | ||
type = _ref.type, | ||
emoji = _ref.emoji; | ||
var dataAttrs = { | ||
'data-callout-type': type | ||
}; | ||
if (emoji) { | ||
dataAttrs['data-callout-emoji'] = emoji; | ||
} | ||
return /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({}, dataAttrs), {}, { | ||
children: [emoji && /*#__PURE__*/jsx("div", { | ||
className: "remirror-callout-emoji-wrapper", | ||
children: /*#__PURE__*/jsx("span", { | ||
children: emoji | ||
}) | ||
}), /*#__PURE__*/jsx("div", { | ||
children: children | ||
})] | ||
})); | ||
}; | ||
@@ -30,0 +48,0 @@ |
{ | ||
"name": "@remirror/react-renderer", | ||
"version": "0.0.0-pr1031.1", | ||
"version": "0.0.0-pr1102.1", | ||
"description": "Render the JSON output from your remirror editor as a react component", | ||
@@ -38,3 +38,3 @@ "keywords": [ | ||
"@babel/runtime": "^7.13.10", | ||
"@remirror/core": "0.0.0-pr1031.1" | ||
"@remirror/core": "0.0.0-pr1102.1" | ||
}, | ||
@@ -41,0 +41,0 @@ "devDependencies": { |
52300
4.75%1277
5.8%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed