Skip to content

Instantly share code, notes, and snippets.

@3200pro
Last active November 29, 2020 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3200pro/464cd6389d3b04a94820eb13a31c5548 to your computer and use it in GitHub Desktop.
Save 3200pro/464cd6389d3b04a94820eb13a31c5548 to your computer and use it in GitHub Desktop.
Sanity Schema - Shuffled Text - Part 4
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