@draftbit/core 46.2.4-0e692a.5 → 46.2.4-25c40a.5
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/lib/commonjs/components/Banner.js +24 -4
- package/lib/commonjs/components/Config.js +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +17 -2
- package/lib/commonjs/components/Picker/PickerComponent.android.js +24 -5
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +11 -2
- package/lib/commonjs/components/{Svg.js → SVG.js} +7 -6
- package/lib/commonjs/components/Table/index.js +55 -0
- package/lib/commonjs/components/Table/table.js +35 -0
- package/lib/commonjs/components/Table/tableCell.js +50 -0
- package/lib/commonjs/components/Table/tableHeader.js +41 -0
- package/lib/commonjs/components/Table/tablePaginator.js +17 -0
- package/lib/commonjs/components/Table/tableRow.js +47 -0
- package/lib/commonjs/components/Table/tableTitle.js +60 -0
- package/lib/commonjs/components/Touchable.js +16 -2
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +45 -7
- package/lib/commonjs/mappings/{Svg.js → SVG.js} +0 -1
- package/lib/commonjs/mappings/StarRating.js +6 -2
- package/lib/commonjs/mappings/table.js +103 -0
- package/lib/commonjs/utilities.js +2 -2
- package/lib/module/components/Config.js +1 -1
- package/lib/module/components/Portal/PortalManager.js +20 -12
- package/lib/module/components/{Svg.js → SVG.js} +7 -6
- package/lib/module/components/Table/index.js +6 -0
- package/lib/module/components/Table/table.js +23 -0
- package/lib/module/components/Table/tableCell.js +37 -0
- package/lib/module/components/Table/tableHeader.js +25 -0
- package/lib/module/components/Table/tablePaginator.js +6 -0
- package/lib/module/components/Table/tableRow.js +33 -0
- package/lib/module/components/Table/tableTitle.js +47 -0
- package/lib/module/index.js +2 -1
- package/lib/module/mappings/SVG.js +14 -0
- package/lib/module/mappings/table.js +94 -0
- package/lib/module/utilities.js +3 -3
- package/lib/typescript/src/components/SVG.d.ts +8 -0
- package/lib/typescript/src/components/Table/index.d.ts +6 -0
- package/lib/typescript/src/components/Table/table.d.ts +8 -0
- package/lib/typescript/src/components/Table/tableCell.d.ts +10 -0
- package/lib/typescript/src/components/Table/tableHeader.d.ts +12 -0
- package/lib/typescript/src/components/Table/tablePaginator.d.ts +3 -0
- package/lib/typescript/src/components/Table/tableRow.d.ts +12 -0
- package/lib/typescript/src/components/Table/tableTitle.d.ts +12 -0
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/mappings/{Svg.d.ts → SVG.d.ts} +0 -1
- package/lib/typescript/src/mappings/table.d.ts +153 -0
- package/lib/typescript/src/utilities.d.ts +3 -3
- package/package.json +4 -4
- package/src/components/Config.js +1 -1
- package/src/components/Config.ts +1 -1
- package/src/components/{Svg.js → SVG.js} +6 -5
- package/src/components/SVG.tsx +35 -0
- package/src/components/Table/index.js +6 -0
- package/src/components/Table/index.tsx +6 -0
- package/src/components/Table/table.js +10 -0
- package/src/components/Table/table.tsx +22 -0
- package/src/components/Table/tableCell.js +21 -0
- package/src/components/Table/tableCell.tsx +44 -0
- package/src/components/Table/tableHeader.js +11 -0
- package/src/components/Table/tableHeader.tsx +28 -0
- package/src/components/Table/tablePaginator.js +5 -0
- package/src/components/Table/tablePaginator.tsx +10 -0
- package/src/components/Table/tableRow.js +16 -0
- package/src/components/Table/tableRow.tsx +31 -0
- package/src/components/Table/tableTitle.js +28 -0
- package/src/components/Table/tableTitle.tsx +58 -0
- package/src/index.js +2 -1
- package/src/index.tsx +10 -1
- package/src/mappings/SVG.js +14 -0
- package/src/mappings/SVG.ts +15 -0
- package/src/mappings/table.js +137 -0
- package/src/mappings/table.ts +145 -0
- package/src/utilities.js +5 -2
- package/src/utilities.ts +13 -2
- package/lib/module/mappings/Svg.js +0 -15
- package/lib/typescript/src/components/Svg.d.ts +0 -7
- package/src/components/Svg.tsx +0 -35
- package/src/mappings/Svg.js +0 -20
- package/src/mappings/Svg.ts +0 -25
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createSvgProp } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "SVG",
|
|
4
|
+
tag: "SVG",
|
|
5
|
+
description: "An SVG component",
|
|
6
|
+
category: COMPONENT_TYPES.media,
|
|
7
|
+
layout: {
|
|
8
|
+
width: 100,
|
|
9
|
+
height: 100,
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
source: createSvgProp(),
|
|
13
|
+
},
|
|
14
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createSvgProp } from "@draftbit/types";
|
|
2
|
+
|
|
3
|
+
export const SEED_DATA = {
|
|
4
|
+
name: "SVG",
|
|
5
|
+
tag: "SVG",
|
|
6
|
+
description: "An SVG component",
|
|
7
|
+
category: COMPONENT_TYPES.media,
|
|
8
|
+
layout: {
|
|
9
|
+
width: 100,
|
|
10
|
+
height: 100,
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
source: createSvgProp(),
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, GROUPS, createBoolProp, createTextProp, createNumberProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = [
|
|
3
|
+
{
|
|
4
|
+
name: "Table",
|
|
5
|
+
tag: "Table",
|
|
6
|
+
category: COMPONENT_TYPES.container,
|
|
7
|
+
stylesPanelSections: [
|
|
8
|
+
StylesPanelSections.Background,
|
|
9
|
+
StylesPanelSections.Borders,
|
|
10
|
+
StylesPanelSections.Size,
|
|
11
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
12
|
+
StylesPanelSections.Position,
|
|
13
|
+
StylesPanelSections.Effects,
|
|
14
|
+
],
|
|
15
|
+
layout: {
|
|
16
|
+
width: "100%",
|
|
17
|
+
},
|
|
18
|
+
props: {},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "Table Row",
|
|
22
|
+
tag: "TableRow",
|
|
23
|
+
category: COMPONENT_TYPES.container,
|
|
24
|
+
stylesPanelSections: [
|
|
25
|
+
StylesPanelSections.Background,
|
|
26
|
+
StylesPanelSections.Borders,
|
|
27
|
+
StylesPanelSections.Size,
|
|
28
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
29
|
+
StylesPanelSections.Position,
|
|
30
|
+
StylesPanelSections.Effects,
|
|
31
|
+
],
|
|
32
|
+
layout: {
|
|
33
|
+
paddingLeft: 16,
|
|
34
|
+
paddingRight: 16,
|
|
35
|
+
borderBottomWidth: 1,
|
|
36
|
+
borderStyle: "solid",
|
|
37
|
+
},
|
|
38
|
+
props: {},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "Table Cell",
|
|
42
|
+
tag: "TableCell",
|
|
43
|
+
category: COMPONENT_TYPES.container,
|
|
44
|
+
layout: {
|
|
45
|
+
paddingTop: 16,
|
|
46
|
+
paddingBottom: 16,
|
|
47
|
+
paddingLeft: 8,
|
|
48
|
+
paddingRight: 8,
|
|
49
|
+
},
|
|
50
|
+
stylesPanelSections: [
|
|
51
|
+
StylesPanelSections.Typography,
|
|
52
|
+
StylesPanelSections.Background,
|
|
53
|
+
StylesPanelSections.Borders,
|
|
54
|
+
StylesPanelSections.Size,
|
|
55
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
56
|
+
StylesPanelSections.Position,
|
|
57
|
+
StylesPanelSections.Effects,
|
|
58
|
+
],
|
|
59
|
+
props: {
|
|
60
|
+
numeric: createBoolProp({
|
|
61
|
+
label: "Is Numeric Cell?",
|
|
62
|
+
description: "Does the cell contain a numeric value?",
|
|
63
|
+
group: GROUPS.data,
|
|
64
|
+
}),
|
|
65
|
+
value: createTextProp({
|
|
66
|
+
label: "Cell Value",
|
|
67
|
+
description: "Table Cell Value",
|
|
68
|
+
group: GROUPS.data,
|
|
69
|
+
}),
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "Table Header",
|
|
74
|
+
tag: "TableHeader",
|
|
75
|
+
category: COMPONENT_TYPES.container,
|
|
76
|
+
stylesPanelSections: [
|
|
77
|
+
StylesPanelSections.Background,
|
|
78
|
+
StylesPanelSections.Borders,
|
|
79
|
+
StylesPanelSections.Size,
|
|
80
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
81
|
+
StylesPanelSections.Position,
|
|
82
|
+
StylesPanelSections.Effects,
|
|
83
|
+
],
|
|
84
|
+
layout: {
|
|
85
|
+
paddingLeft: 16,
|
|
86
|
+
paddingRight: 16,
|
|
87
|
+
borderBottomWidth: 1,
|
|
88
|
+
borderStyle: "solid",
|
|
89
|
+
backgroundColor: "#EFEFEF",
|
|
90
|
+
},
|
|
91
|
+
props: {},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: "Table Title",
|
|
95
|
+
tag: "TableTitle",
|
|
96
|
+
category: COMPONENT_TYPES.container,
|
|
97
|
+
stylesPanelSections: [
|
|
98
|
+
StylesPanelSections.Typography,
|
|
99
|
+
StylesPanelSections.Background,
|
|
100
|
+
StylesPanelSections.Borders,
|
|
101
|
+
StylesPanelSections.Size,
|
|
102
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
103
|
+
StylesPanelSections.Position,
|
|
104
|
+
StylesPanelSections.Effects,
|
|
105
|
+
],
|
|
106
|
+
layout: {
|
|
107
|
+
fontSize: 14,
|
|
108
|
+
fontWeight: "500",
|
|
109
|
+
paddingTop: 16,
|
|
110
|
+
paddingBottom: 16,
|
|
111
|
+
paddingLeft: 8,
|
|
112
|
+
paddingRight: 8,
|
|
113
|
+
},
|
|
114
|
+
props: {
|
|
115
|
+
numeric: createBoolProp({
|
|
116
|
+
label: "Is Numeric Cell?",
|
|
117
|
+
description: "Does the cell contain a numeric value?",
|
|
118
|
+
group: GROUPS.data,
|
|
119
|
+
}),
|
|
120
|
+
value: createTextProp({
|
|
121
|
+
label: "Cell Value",
|
|
122
|
+
description: "Table Cell Value",
|
|
123
|
+
group: GROUPS.data,
|
|
124
|
+
}),
|
|
125
|
+
isAscending: createBoolProp({
|
|
126
|
+
label: "Is Ascending?",
|
|
127
|
+
description: "Does the cell contain a numeric value?",
|
|
128
|
+
group: GROUPS.data,
|
|
129
|
+
}),
|
|
130
|
+
numberOfLines: createNumberProp({
|
|
131
|
+
label: "Number of Lines",
|
|
132
|
+
description: "Number of Lines",
|
|
133
|
+
group: GROUPS.basic,
|
|
134
|
+
}),
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
];
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
GROUPS,
|
|
4
|
+
createBoolProp,
|
|
5
|
+
createTextProp,
|
|
6
|
+
createNumberProp,
|
|
7
|
+
StylesPanelSections,
|
|
8
|
+
} from "@draftbit/types";
|
|
9
|
+
|
|
10
|
+
export const SEED_DATA = [
|
|
11
|
+
{
|
|
12
|
+
name: "Table",
|
|
13
|
+
tag: "Table",
|
|
14
|
+
category: COMPONENT_TYPES.container,
|
|
15
|
+
stylesPanelSections: [
|
|
16
|
+
StylesPanelSections.Background,
|
|
17
|
+
StylesPanelSections.Borders,
|
|
18
|
+
StylesPanelSections.Size,
|
|
19
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
20
|
+
StylesPanelSections.Position,
|
|
21
|
+
StylesPanelSections.Effects,
|
|
22
|
+
],
|
|
23
|
+
layout: {
|
|
24
|
+
width: "100%",
|
|
25
|
+
},
|
|
26
|
+
props: {},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "Table Row",
|
|
30
|
+
tag: "TableRow",
|
|
31
|
+
category: COMPONENT_TYPES.container,
|
|
32
|
+
stylesPanelSections: [
|
|
33
|
+
StylesPanelSections.Background,
|
|
34
|
+
StylesPanelSections.Borders,
|
|
35
|
+
StylesPanelSections.Size,
|
|
36
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
37
|
+
StylesPanelSections.Position,
|
|
38
|
+
StylesPanelSections.Effects,
|
|
39
|
+
],
|
|
40
|
+
layout: {
|
|
41
|
+
paddingLeft: 16,
|
|
42
|
+
paddingRight: 16,
|
|
43
|
+
borderBottomWidth: 1,
|
|
44
|
+
borderStyle: "solid",
|
|
45
|
+
},
|
|
46
|
+
props: {},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "Table Cell",
|
|
50
|
+
tag: "TableCell",
|
|
51
|
+
category: COMPONENT_TYPES.container,
|
|
52
|
+
layout: {
|
|
53
|
+
paddingTop: 16,
|
|
54
|
+
paddingBottom: 16,
|
|
55
|
+
paddingLeft: 8,
|
|
56
|
+
paddingRight: 8,
|
|
57
|
+
},
|
|
58
|
+
stylesPanelSections: [
|
|
59
|
+
StylesPanelSections.Typography,
|
|
60
|
+
StylesPanelSections.Background,
|
|
61
|
+
StylesPanelSections.Borders,
|
|
62
|
+
StylesPanelSections.Size,
|
|
63
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
64
|
+
StylesPanelSections.Position,
|
|
65
|
+
StylesPanelSections.Effects,
|
|
66
|
+
],
|
|
67
|
+
props: {
|
|
68
|
+
numeric: createBoolProp({
|
|
69
|
+
label: "Is Numeric Cell?",
|
|
70
|
+
description: "Does the cell contain a numeric value?",
|
|
71
|
+
group: GROUPS.data,
|
|
72
|
+
}),
|
|
73
|
+
value: createTextProp({
|
|
74
|
+
label: "Cell Value",
|
|
75
|
+
description: "Table Cell Value",
|
|
76
|
+
group: GROUPS.data,
|
|
77
|
+
}),
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "Table Header",
|
|
82
|
+
tag: "TableHeader",
|
|
83
|
+
category: COMPONENT_TYPES.container,
|
|
84
|
+
stylesPanelSections: [
|
|
85
|
+
StylesPanelSections.Background,
|
|
86
|
+
StylesPanelSections.Borders,
|
|
87
|
+
StylesPanelSections.Size,
|
|
88
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
89
|
+
StylesPanelSections.Position,
|
|
90
|
+
StylesPanelSections.Effects,
|
|
91
|
+
],
|
|
92
|
+
layout: {
|
|
93
|
+
paddingLeft: 16,
|
|
94
|
+
paddingRight: 16,
|
|
95
|
+
borderBottomWidth: 1,
|
|
96
|
+
borderStyle: "solid",
|
|
97
|
+
backgroundColor: "#EFEFEF",
|
|
98
|
+
},
|
|
99
|
+
props: {},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "Table Title",
|
|
103
|
+
tag: "TableTitle",
|
|
104
|
+
category: COMPONENT_TYPES.container,
|
|
105
|
+
stylesPanelSections: [
|
|
106
|
+
StylesPanelSections.Typography,
|
|
107
|
+
StylesPanelSections.Background,
|
|
108
|
+
StylesPanelSections.Borders,
|
|
109
|
+
StylesPanelSections.Size,
|
|
110
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
111
|
+
StylesPanelSections.Position,
|
|
112
|
+
StylesPanelSections.Effects,
|
|
113
|
+
],
|
|
114
|
+
layout: {
|
|
115
|
+
fontSize: 14,
|
|
116
|
+
fontWeight: "500",
|
|
117
|
+
paddingTop: 16,
|
|
118
|
+
paddingBottom: 16,
|
|
119
|
+
paddingLeft: 8,
|
|
120
|
+
paddingRight: 8,
|
|
121
|
+
},
|
|
122
|
+
props: {
|
|
123
|
+
numeric: createBoolProp({
|
|
124
|
+
label: "Is Numeric Cell?",
|
|
125
|
+
description: "Does the cell contain a numeric value?",
|
|
126
|
+
group: GROUPS.data,
|
|
127
|
+
}),
|
|
128
|
+
value: createTextProp({
|
|
129
|
+
label: "Cell Value",
|
|
130
|
+
description: "Table Cell Value",
|
|
131
|
+
group: GROUPS.data,
|
|
132
|
+
}),
|
|
133
|
+
isAscending: createBoolProp({
|
|
134
|
+
label: "Is Ascending?",
|
|
135
|
+
description: "Does the cell contain a numeric value?",
|
|
136
|
+
group: GROUPS.data,
|
|
137
|
+
}),
|
|
138
|
+
numberOfLines: createNumberProp({
|
|
139
|
+
label: "Number of Lines",
|
|
140
|
+
description: "Number of Lines",
|
|
141
|
+
group: GROUPS.basic,
|
|
142
|
+
}),
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
];
|
package/src/utilities.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
|
-
import { isString, isNumber, pick, pickBy, identity } from "lodash";
|
|
2
|
+
import { isString, isNumber, pick, pickBy, identity, omitBy, isNil, } from "lodash";
|
|
3
3
|
export function extractStyles(style) {
|
|
4
4
|
const { color, fontFamily, fontWeight, fontSize, lineHeight, letterSpacing, textTransform, textAlign, textDecorationLine, textDecorationColor, textDecorationStyle, ...viewStyles } = StyleSheet.flatten(style || {});
|
|
5
5
|
const textStyles = {
|
|
@@ -15,7 +15,10 @@ export function extractStyles(style) {
|
|
|
15
15
|
textDecorationColor,
|
|
16
16
|
textDecorationStyle,
|
|
17
17
|
};
|
|
18
|
-
return {
|
|
18
|
+
return {
|
|
19
|
+
viewStyles: omitBy(viewStyles, isNil),
|
|
20
|
+
textStyles: omitBy(textStyles, isNil),
|
|
21
|
+
};
|
|
19
22
|
}
|
|
20
23
|
export const borderStyleNames = [
|
|
21
24
|
"borderRadius",
|
package/src/utilities.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { StyleSheet, StyleProp, TextStyle } from "react-native";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
isString,
|
|
4
|
+
isNumber,
|
|
5
|
+
pick,
|
|
6
|
+
pickBy,
|
|
7
|
+
identity,
|
|
8
|
+
omitBy,
|
|
9
|
+
isNil,
|
|
10
|
+
} from "lodash";
|
|
3
11
|
|
|
4
12
|
export function extractStyles(style: StyleProp<any>) {
|
|
5
13
|
const {
|
|
@@ -31,7 +39,10 @@ export function extractStyles(style: StyleProp<any>) {
|
|
|
31
39
|
textDecorationStyle,
|
|
32
40
|
};
|
|
33
41
|
|
|
34
|
-
return {
|
|
42
|
+
return {
|
|
43
|
+
viewStyles: omitBy(viewStyles, isNil),
|
|
44
|
+
textStyles: omitBy(textStyles, isNil),
|
|
45
|
+
};
|
|
35
46
|
}
|
|
36
47
|
|
|
37
48
|
export const borderStyleNames = [
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createSvgProp, StylesPanelSections } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = {
|
|
3
|
-
name: "SVG",
|
|
4
|
-
tag: "SVG",
|
|
5
|
-
description: "An SVG component",
|
|
6
|
-
category: COMPONENT_TYPES.media,
|
|
7
|
-
layout: {
|
|
8
|
-
width: 100,
|
|
9
|
-
height: 100
|
|
10
|
-
},
|
|
11
|
-
stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Effects],
|
|
12
|
-
props: {
|
|
13
|
-
source: createSvgProp()
|
|
14
|
-
}
|
|
15
|
-
};
|
package/src/components/Svg.tsx
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View, Platform, Image } from "react-native";
|
|
3
|
-
import { SvgUri } from "react-native-svg";
|
|
4
|
-
|
|
5
|
-
import Config from "./Config";
|
|
6
|
-
|
|
7
|
-
type SvgComponentProps = {
|
|
8
|
-
source: string;
|
|
9
|
-
style?: any;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const Svg: React.FC<React.PropsWithChildren<SvgComponentProps>> = ({
|
|
13
|
-
source = Config.placeholderSvgURL,
|
|
14
|
-
style,
|
|
15
|
-
}) => {
|
|
16
|
-
return (
|
|
17
|
-
<>
|
|
18
|
-
{Platform.OS === "ios" && (
|
|
19
|
-
<View style={style}>
|
|
20
|
-
<SvgUri width="100%" height="100%" uri={source} />
|
|
21
|
-
</View>
|
|
22
|
-
)}
|
|
23
|
-
{Platform.OS === "android" && (
|
|
24
|
-
<View style={style}>
|
|
25
|
-
<SvgUri width="100%" height="100%" uri={source} />
|
|
26
|
-
</View>
|
|
27
|
-
)}
|
|
28
|
-
{Platform.OS === "web" && (
|
|
29
|
-
<Image style={style} source={{ uri: source }} />
|
|
30
|
-
)}
|
|
31
|
-
</>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default Svg;
|
package/src/mappings/Svg.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createSvgProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = {
|
|
3
|
-
name: "SVG",
|
|
4
|
-
tag: "SVG",
|
|
5
|
-
description: "An SVG component",
|
|
6
|
-
category: COMPONENT_TYPES.media,
|
|
7
|
-
layout: {
|
|
8
|
-
width: 100,
|
|
9
|
-
height: 100,
|
|
10
|
-
},
|
|
11
|
-
stylesPanelSections: [
|
|
12
|
-
StylesPanelSections.Size,
|
|
13
|
-
StylesPanelSections.Margins,
|
|
14
|
-
StylesPanelSections.Position,
|
|
15
|
-
StylesPanelSections.Effects,
|
|
16
|
-
],
|
|
17
|
-
props: {
|
|
18
|
-
source: createSvgProp(),
|
|
19
|
-
},
|
|
20
|
-
};
|
package/src/mappings/Svg.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
COMPONENT_TYPES,
|
|
3
|
-
createSvgProp,
|
|
4
|
-
StylesPanelSections,
|
|
5
|
-
} from "@draftbit/types";
|
|
6
|
-
|
|
7
|
-
export const SEED_DATA = {
|
|
8
|
-
name: "SVG",
|
|
9
|
-
tag: "SVG",
|
|
10
|
-
description: "An SVG component",
|
|
11
|
-
category: COMPONENT_TYPES.media,
|
|
12
|
-
layout: {
|
|
13
|
-
width: 100,
|
|
14
|
-
height: 100,
|
|
15
|
-
},
|
|
16
|
-
stylesPanelSections: [
|
|
17
|
-
StylesPanelSections.Size,
|
|
18
|
-
StylesPanelSections.Margins,
|
|
19
|
-
StylesPanelSections.Position,
|
|
20
|
-
StylesPanelSections.Effects,
|
|
21
|
-
],
|
|
22
|
-
props: {
|
|
23
|
-
source: createSvgProp(),
|
|
24
|
-
},
|
|
25
|
-
};
|