Skip to content

Commit a0e2318

Browse files
committed
Merge pull request #232 from CrystallizeAPI/feat-more-header-levels
feat(react-js-components): enable h4,5,6 in the content transformers
2 parents e5e37ad + 226347b commit a0e2318

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: ⎔ Setup node
1717
uses: actions/setup-node@v3
1818
with:
19-
node-version: 16
19+
node-version: 18
2020
always-auth: true
2121
registry-url: 'https://registry.npmjs.org'
2222
scope: '@crystallize'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@crystallize/reactjs-components",
33
"license": "MIT",
4-
"version": "2.0.0",
4+
"version": "2.0.1",
55
"author": "Crystallize <[email protected]> (https://crystallize.com)",
66
"contributors": [
77
"Håkon Krogh <[email protected]>",

src/content-transformer/component.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,21 @@ export const Renderers: Record<keyof Overrides, (props: NodeProps) => JSX.Elemen
9696
<NodeContent {...props} />
9797
</h3>
9898
),
99+
heading4: (props) => (
100+
<h4>
101+
<NodeContent {...props} />
102+
</h4>
103+
),
104+
heading5: (props) => (
105+
<h5>
106+
<NodeContent {...props} />
107+
</h5>
108+
),
109+
heading6: (props) => (
110+
<h6>
111+
<NodeContent {...props} />
112+
</h6>
113+
),
99114
deleted: (props) => (
100115
<del>
101116
<NodeContent {...props} />

src/content-transformer/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ export interface Overrides {
3131
heading1?: Override;
3232
heading2?: Override;
3333
heading3?: Override;
34+
heading4?: Override;
35+
heading5?: Override;
36+
heading6?: Override;
3437
deleted?: Override;
3538
subscripted?: Override;
3639
superscripted?: Override;

0 commit comments

Comments
 (0)