-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(react): accept both array and object for content
- Loading branch information
1 parent
cd92566
commit b9b2e23
Showing
5 changed files
with
128 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,66 @@ | ||
import { RichTextContent } from '@graphcms/rich-text-types'; | ||
|
||
export const content: RichTextContent = [ | ||
{ | ||
type: 'heading-two', | ||
children: [{ text: 'Awesome new GraphCMS cap!' }], | ||
}, | ||
{ | ||
type: 'paragraph', | ||
children: [ | ||
{ text: 'Sweet black ' }, | ||
{ bold: true, text: 'cap' }, | ||
{ text: ' ' }, | ||
{ text: 'with', underline: true }, | ||
{ text: ' ' }, | ||
{ text: 'embroidered', italic: true }, | ||
{ text: ' ' }, | ||
{ bold: true, text: 'GraphCMS' }, | ||
{ text: ' logo.' }, | ||
], | ||
}, | ||
{ | ||
type: 'bulleted-list', | ||
children: [ | ||
{ | ||
type: 'list-item', | ||
children: [ | ||
{ | ||
type: 'list-item-child', | ||
children: [{ text: 'Embroided logo' }], | ||
}, | ||
], | ||
}, | ||
{ | ||
type: 'list-item', | ||
children: [ | ||
{ type: 'list-item-child', children: [{ text: 'Fits well' }] }, | ||
], | ||
}, | ||
{ | ||
type: 'list-item', | ||
children: [ | ||
{ | ||
type: 'list-item-child', | ||
children: [{ text: 'Comes in black' }], | ||
}, | ||
], | ||
}, | ||
{ | ||
type: 'list-item', | ||
children: [ | ||
{ | ||
type: 'list-item-child', | ||
children: [{ text: 'Reasonably priced' }], | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ type: 'paragraph', children: [{ text: '<Test />', code: true }] }, | ||
]; | ||
export const content: RichTextContent = { | ||
children: [ | ||
{ | ||
type: 'heading-two', | ||
children: [{ text: 'Awesome new GraphCMS cap!' }], | ||
}, | ||
{ | ||
type: 'paragraph', | ||
children: [ | ||
{ text: 'Sweet black ' }, | ||
{ bold: true, text: 'cap' }, | ||
{ text: ' ' }, | ||
{ text: 'with', underline: true }, | ||
{ text: ' ' }, | ||
{ text: 'embroidered', italic: true }, | ||
{ text: ' ' }, | ||
{ bold: true, text: 'GraphCMS' }, | ||
{ text: ' logo.' }, | ||
], | ||
}, | ||
{ | ||
type: 'bulleted-list', | ||
children: [ | ||
{ | ||
type: 'list-item', | ||
children: [ | ||
{ | ||
type: 'list-item-child', | ||
children: [{ text: 'Embroided logo' }], | ||
}, | ||
], | ||
}, | ||
{ | ||
type: 'list-item', | ||
children: [ | ||
{ | ||
type: 'list-item-child', | ||
children: [{ text: 'Fits well' }], | ||
}, | ||
], | ||
}, | ||
{ | ||
type: 'list-item', | ||
children: [ | ||
{ | ||
type: 'list-item-child', | ||
children: [{ text: 'Comes in black' }], | ||
}, | ||
], | ||
}, | ||
{ | ||
type: 'list-item', | ||
children: [ | ||
{ | ||
type: 'list-item-child', | ||
children: [{ text: 'Reasonably priced' }], | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ type: 'paragraph', children: [{ text: '<Test />', code: true }] }, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters