Last active
November 29, 2020 22:05
-
-
Save 3200pro/464cd6389d3b04a94820eb13a31c5548 to your computer and use it in GitHub Desktop.
Sanity Schema - Shuffled Text - Part 4
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
export default { | |
title: 'Text', | |
name: 'standardText', | |
type: 'object', | |
fields: [ | |
{ | |
title: 'String', | |
name: 'string', | |
type: 'string' | |
}, | |
{ | |
title: 'Text Style', | |
name: 'textStyle', | |
type: 'string', | |
options: { | |
list: [ | |
{title: 'None', value: 'span'}, | |
{title: 'Strong', value: 'strong'}, | |
{title: 'Italic', value: 'italic'}, | |
{title: 'H1', value: 'h1'}, | |
{title: 'H2', value: 'h2'}, | |
{title: 'H3', value: 'h3'}, | |
{title: 'H4', value: 'h4'}, | |
{title: 'H5', value: 'h5'}, | |
] | |
} | |
}, | |
{ | |
title: 'Text Size', | |
name: 'textSize', | |
type: 'number', | |
validation: Rule => | |
Rule.error("Please select a size").required(), | |
options: { | |
list: [ | |
{title: 'Standard', value: 1}, | |
{title: 'Large', value: 3}, | |
{title: 'XLarge', value: 5}, | |
{title: 'XXLarge', value: 7} ] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment