You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/docs/features/blocks/typography.mdx
+31-3Lines changed: 31 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ type HeadingBlockOptions = Partial<{
35
35
36
36
`defaultLevel:` The default level for headings which are created/inserted without a set level, which is `1` by default.
37
37
38
-
`levels:` The heading levels that the block supports, or '1'-'6' by default.
38
+
`levels:` The heading levels that the block supports, which is `[1, 2, 3, 4, 5, 6]` by default.
39
39
40
40
`allowToggleHeadings:` Whether toggle headings should be supported, `true` by default. Toggle headings have a button which toggles between hiding and showing the block's children.
41
41
@@ -47,13 +47,16 @@ type HeadingBlock = {
47
47
type:"heading";
48
48
props: {
49
49
level:1|2|3|4|5|6=1;
50
+
isToggleable?:boolean;
50
51
} &DefaultProps;
51
52
content:InlineContent[];
52
53
children:Block[];
53
54
};
54
55
```
55
56
56
-
`level:` The heading level, representing a title (`level: 1`), heading (`level: 2`), and subheadings (`level: 3`, `level: 4`, `level: 5`, `level: 6`).
57
+
`level:` The heading level, representing a title (`level: 1`), heading (`level: 2`), and subheadings (`level: 3`, `level: 4`, `level: 5`, `level: 6`). Defaults to `1`.
58
+
59
+
`isToggleable:` Whether the heading is toggled (children hidden). Only present when `allowToggleHeadings` is `true` (the default). Defaults to `false`.
57
60
58
61
## Quote
59
62
@@ -63,8 +66,33 @@ type HeadingBlock = {
63
66
typeQuoteBlock= {
64
67
id:string;
65
68
type:"quote";
66
-
props:DefaultProps;
69
+
props: {
70
+
backgroundColor:string;
71
+
textColor:string;
72
+
};
67
73
content:InlineContent[];
68
74
children:Block[];
69
75
};
70
76
```
77
+
78
+
`backgroundColor:` The background color of the block. Defaults to `"default"`.
79
+
80
+
`textColor:` The text color of the block. Defaults to `"default"`.
81
+
82
+
## Divider
83
+
84
+
A horizontal rule used to separate content.
85
+
86
+
**Type & Props**
87
+
88
+
```typescript
89
+
typeDividerBlock= {
90
+
id:string;
91
+
type:"divider";
92
+
props: {};
93
+
content:undefined;
94
+
children:Block[];
95
+
};
96
+
```
97
+
98
+
The divider block has no props and no content. It can be inserted by typing `---` on an empty line.
0 commit comments