forked from sqlpage/SQLPage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path29_divider_component.sql
152 lines (150 loc) · 3.32 KB
/
29_divider_component.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
INSERT INTO component (name, description, icon, introduced_in_version)
VALUES (
'divider',
'Dividers help organize content and make the interface layout clear and uncluttered.',
'separator',
'0.18.0'
);
INSERT INTO parameter (
component,
name,
description,
type,
top_level,
optional
)
VALUES (
'divider',
'contents',
'A text in the divider.',
'TEXT',
TRUE,
TRUE
),
(
'divider',
'position',
'Position of the text (e.g. left, right).',
'TEXT',
TRUE,
TRUE
),
(
'divider',
'color',
'The name of a color for this span of text.',
'COLOR',
TRUE,
TRUE
),
(
'divider',
'size',
'The size of the divider text, from 1 to 6.',
'INTEGER',
TRUE,
TRUE
),
(
'divider',
'bold',
'Whether the text is bold.',
'BOOLEAN',
TRUE,
TRUE
),
(
'divider',
'italics',
'Whether the text is italicized.',
'BOOLEAN',
TRUE,
TRUE
),
(
'divider',
'underline',
'Whether the text is underlined.',
'BOOLEAN',
TRUE,
TRUE
),
(
'divider',
'link',
'URL of the link for the divider text. Available only when contents is present.',
'URL',
TRUE,
TRUE
);
-- Insert example(s) for the component
INSERT INTO example(component, description, properties)
VALUES
(
'divider',
'An empty divider',
JSON(
'[
{
"component":"divider"
}
]'
)
),
(
'divider',
'A divider with centered text',
JSON(
'[
{
"component":"divider",
"contents":"Hello"
}
]'
)
),
(
'divider',
'A divider with text at left',
JSON(
'[
{
"component":"divider",
"contents":"Hello",
"position":"left"
}
]'
)
),
(
'divider',
'A divider with blue text and a link',
JSON(
'[
{
"component":"divider",
"contents":"SQLPage components",
"link":"/documentation.sql",
"color":"blue"
}
]'
)
),
(
'divider',
'A divider with bold, italic, and underlined text',
JSON(
'[
{
"component":"divider",
"contents":"Important notice",
"position":"left",
"color":"red",
"size":5,
"bold":true,
"italics":true,
"underline":true
}
]'
)
);