react-ink-scripter 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ReactInkScripter.d.ts +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/index.js +2 -1
- package/package.json +1 -1
|
@@ -34,5 +34,5 @@ export type ContentType = (ContentTitleItem | ContentContainerItem | ContentTabl
|
|
|
34
34
|
export type ReactInkScripterProps = {
|
|
35
35
|
value?: ContentType;
|
|
36
36
|
};
|
|
37
|
-
export declare const ReactInkScripter: (
|
|
37
|
+
export declare const ReactInkScripter: (props: ReactInkScripterProps) => JSX.Element;
|
|
38
38
|
export default ReactInkScripter;
|
package/dist/cjs/index.js
CHANGED
|
@@ -144,9 +144,9 @@ var Field = function Field(_ref6) {
|
|
|
144
144
|
})]
|
|
145
145
|
});
|
|
146
146
|
};
|
|
147
|
-
var ReactInkScripter = function ReactInkScripter(
|
|
148
|
-
var
|
|
149
|
-
value =
|
|
147
|
+
var ReactInkScripter = function ReactInkScripter(props) {
|
|
148
|
+
var _props$value = props.value,
|
|
149
|
+
value = _props$value === void 0 ? [] : _props$value;
|
|
150
150
|
return jsxRuntime.jsx("div", {
|
|
151
151
|
className: "ink-scripter-root",
|
|
152
152
|
children: value.map(function (item, index) {
|
package/dist/index.js
CHANGED
|
@@ -70,7 +70,8 @@ const Text = ({ value, span }) => {
|
|
|
70
70
|
const Field = ({ value, label }) => {
|
|
71
71
|
return (jsxs("div", { className: "ink-scripter-filed", children: [jsxs("label", { children: [label, ":"] }), jsx("span", { children: value })] }));
|
|
72
72
|
};
|
|
73
|
-
const ReactInkScripter = (
|
|
73
|
+
const ReactInkScripter = (props) => {
|
|
74
|
+
const { value = [] } = props;
|
|
74
75
|
return (jsx("div", { className: "ink-scripter-root", children: value.map((item, index) => {
|
|
75
76
|
switch (item.type) {
|
|
76
77
|
case "title":
|