Skip to content

Commit 6885b38

Browse files
istarkovkof
andauthored
feat: Add initial text to the Content Block (#4498)
## Description ref #3994 ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 0000) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env` file --------- Co-authored-by: Oleg Isonen <[email protected]>
1 parent 564efe0 commit 6885b38

File tree

1 file changed

+123
-1
lines changed

1 file changed

+123
-1
lines changed

packages/react-sdk/src/core-components.ts

Lines changed: 123 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,129 @@ const blockMeta: WsComponentMeta = {
164164
type: "instance",
165165
label: "Templates",
166166
component: blockTemplateComponent,
167-
children: [],
167+
children: [
168+
{
169+
type: "instance",
170+
component: "Paragraph",
171+
children: [
172+
{
173+
type: "text",
174+
value: "Paragraph text you can edit",
175+
placeholder: true,
176+
},
177+
],
178+
},
179+
{
180+
type: "instance",
181+
component: "List",
182+
children: [
183+
{
184+
type: "instance",
185+
component: "ListItem",
186+
children: [
187+
{
188+
type: "text",
189+
value: "List Item text you can edit",
190+
placeholder: true,
191+
},
192+
],
193+
},
194+
{
195+
type: "instance",
196+
component: "ListItem",
197+
children: [
198+
{
199+
type: "text",
200+
value: "List Item text you can edit",
201+
placeholder: true,
202+
},
203+
],
204+
},
205+
{
206+
type: "instance",
207+
component: "ListItem",
208+
children: [
209+
{
210+
type: "text",
211+
value: "List Item text you can edit",
212+
placeholder: true,
213+
},
214+
],
215+
},
216+
],
217+
},
218+
],
219+
},
220+
{
221+
type: "instance",
222+
component: "Paragraph",
223+
children: [
224+
{
225+
type: "text",
226+
value:
227+
"The Content Block component designates regions on the page where pre-styled instances can be inserted in ",
228+
},
229+
{
230+
type: "instance",
231+
component: "RichTextLink",
232+
children: [
233+
{
234+
type: "text",
235+
value: "Content mode",
236+
},
237+
],
238+
props: [
239+
{
240+
type: "string",
241+
name: "href",
242+
value: "https://wstd.us/content-block",
243+
},
244+
],
245+
},
246+
{
247+
type: "text",
248+
value: ".",
249+
},
250+
],
251+
},
252+
{
253+
type: "instance",
254+
component: "List",
255+
children: [
256+
{
257+
type: "instance",
258+
component: "ListItem",
259+
children: [
260+
{
261+
type: "text",
262+
value:
263+
"In Content mode, you can edit any direct child instances that were pre-added to the Content Block, as well as add new instances predefined in Templates.",
264+
},
265+
],
266+
},
267+
{
268+
type: "instance",
269+
component: "ListItem",
270+
children: [
271+
{
272+
type: "text",
273+
value:
274+
"To predefine instances for insertion in Content mode, switch to Design mode and add them to the Templates container.",
275+
},
276+
],
277+
},
278+
{
279+
type: "instance",
280+
component: "ListItem",
281+
children: [
282+
{
283+
type: "text",
284+
value:
285+
"To insert predefined instances in Content mode, click the + button while hovering over the Content Block on the canvas and choose an instance from the list.",
286+
},
287+
],
288+
},
289+
],
168290
},
169291
],
170292
},

0 commit comments

Comments
 (0)