Skip to content

Commit e125c4d

Browse files
committed
Revert "Remove header mappings"
This reverts commit 1ce355a.
1 parent 0e7223d commit e125c4d

File tree

3 files changed

+164
-0
lines changed

3 files changed

+164
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import {
2+
COMPONENT_TYPES,
3+
createIconProp,
4+
createTextProp,
5+
createActionProp,
6+
Triggers,
7+
BLOCK_STYLES_SECTIONS,
8+
} from "@draftbit/types";
9+
10+
export const SEED_DATA = [
11+
{
12+
name: "Header Large",
13+
tag: "HeaderLarge",
14+
description:
15+
"A large header with an optional touchable right aligned text and icon.",
16+
category: COMPONENT_TYPES.header,
17+
stylesPanelSections: BLOCK_STYLES_SECTIONS,
18+
layout: {},
19+
triggers: [Triggers.OnPress],
20+
props: {
21+
onPress: createActionProp(),
22+
title: createTextProp({
23+
label: "Title",
24+
description: "Text to display",
25+
defaultValue: "Title",
26+
}),
27+
buttonText: createTextProp({
28+
label: "Button text",
29+
description: "Right aligned button text to display",
30+
defaultValue: "See All",
31+
}),
32+
icon: createIconProp({
33+
defaultValue: null,
34+
required: false,
35+
}),
36+
},
37+
},
38+
];
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import {
2+
GROUPS,
3+
COMPONENT_TYPES,
4+
FORM_TYPES,
5+
PROP_TYPES,
6+
BLOCK_STYLES_SECTIONS,
7+
} from "@draftbit/types";
8+
9+
export const SEED_DATA = [
10+
{
11+
name: "Header Medium",
12+
tag: "HeaderMedium",
13+
description:
14+
"A medium header with an optional touchable right aligned text and icon.",
15+
category: COMPONENT_TYPES.header,
16+
stylesPanelSections: BLOCK_STYLES_SECTIONS,
17+
preview_image_url: "{CLOUDINARY_URL}/Header_HeadlineMediumIconText.png",
18+
supports_list_render: false,
19+
props: {
20+
title: {
21+
group: GROUPS.data,
22+
label: "Title",
23+
description: "Text to display",
24+
formType: FORM_TYPES.string,
25+
propType: PROP_TYPES.STRING,
26+
defaultValue: "Title",
27+
editable: true,
28+
required: false,
29+
},
30+
buttonText: {
31+
group: GROUPS.data,
32+
label: "Button text",
33+
description: "Right aligned button text to display",
34+
formType: FORM_TYPES.string,
35+
propType: PROP_TYPES.STRING,
36+
defaultValue: "See All",
37+
editable: true,
38+
required: false,
39+
},
40+
icon: {
41+
group: GROUPS.basic,
42+
label: "Icon",
43+
description: "Name of icon to display",
44+
formType: FORM_TYPES.icon,
45+
propType: PROP_TYPES.ASSET,
46+
defaultValue: null,
47+
editable: true,
48+
required: false,
49+
},
50+
onPress: {
51+
group: GROUPS.basic,
52+
label: "Action",
53+
description: "Action to execute when button pressed",
54+
editable: true,
55+
required: false,
56+
formType: FORM_TYPES.action,
57+
propType: PROP_TYPES.STRING,
58+
defaultValue: null,
59+
},
60+
},
61+
layout: {},
62+
},
63+
];
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import {
2+
GROUPS,
3+
COMPONENT_TYPES,
4+
FORM_TYPES,
5+
PROP_TYPES,
6+
BLOCK_STYLES_SECTIONS,
7+
} from "@draftbit/types";
8+
9+
export const SEED_DATA = [
10+
{
11+
name: "Header Overline",
12+
tag: "HeaderOverline",
13+
description:
14+
"A small header with an optional touchable right aligned text and icon.",
15+
category: COMPONENT_TYPES.header,
16+
stylesPanelSections: BLOCK_STYLES_SECTIONS,
17+
preview_image_url: "{CLOUDINARY_URL}/Header_OverlineIconText.png",
18+
supports_list_render: false,
19+
props: {
20+
title: {
21+
group: GROUPS.data,
22+
label: "Title",
23+
description: "Text to display",
24+
formType: FORM_TYPES.string,
25+
propType: PROP_TYPES.STRING,
26+
defaultValue: "Title",
27+
editable: true,
28+
required: false,
29+
},
30+
buttonText: {
31+
group: GROUPS.data,
32+
label: "Button text",
33+
description: "Right aligned button text to display",
34+
formType: FORM_TYPES.string,
35+
propType: PROP_TYPES.STRING,
36+
defaultValue: "See All",
37+
editable: true,
38+
required: false,
39+
},
40+
icon: {
41+
group: GROUPS.basic,
42+
label: "Icon",
43+
description: "Name of icon to display",
44+
formType: FORM_TYPES.icon,
45+
propType: PROP_TYPES.ASSET,
46+
defaultValue: null,
47+
editable: true,
48+
required: false,
49+
},
50+
onPress: {
51+
group: GROUPS.basic,
52+
label: "Action",
53+
description: "Action to execute when button pressed",
54+
editable: true,
55+
required: false,
56+
formType: FORM_TYPES.action,
57+
propType: PROP_TYPES.STRING,
58+
defaultValue: null,
59+
},
60+
},
61+
layout: {},
62+
},
63+
];

0 commit comments

Comments
 (0)