-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[test-studio] Add hoisted PT type test
- Loading branch information
1 parent
61bfeee
commit 893592e
Showing
2 changed files
with
49 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
export const customBlock = { | ||
name: 'customHoistedBlock', | ||
type: 'block', | ||
title: 'A named custom block', | ||
marks: { | ||
annotations: [ | ||
{type: 'object', name: 'link', fields: [{type: 'string', name: 'url'}]}, | ||
{type: 'object', name: 'test', fields: [{type: 'string', name: 'mystring'}]} | ||
] | ||
}, | ||
of: [ | ||
{type: 'image'}, | ||
{ | ||
type: 'object', | ||
name: 'test', | ||
fields: [{type: 'string', name: 'mystring', validation: Rule => Rule.required()}] | ||
}, | ||
{ | ||
type: 'reference', | ||
name: 'strongAuthorRef', | ||
title: 'A strong author ref', | ||
to: {type: 'author'} | ||
} | ||
] | ||
} | ||
|
||
export const hoistedPt = { | ||
name: 'hoistedPt', | ||
type: 'array', | ||
title: 'Hoisted PT array', | ||
of: [{type: 'customHoistedBlock'}] | ||
} | ||
|
||
export const hoistedPtDocument = { | ||
type: 'document', | ||
name: 'documentWithHoistedPt', | ||
title: 'Hoisted PT document', | ||
fields: [ | ||
{ | ||
type: 'hoistedPt', | ||
name: 'body' | ||
} | ||
] | ||
} |
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
893592e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: