sanity
Version:
Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches
10 lines (7 loc) • 320 B
text/typescript
import {type StringSchemaType} from '@sanity/types'
import {SelectInput} from '../../inputs/SelectInput'
import {StringInput} from '../../inputs/StringInput'
import {getOption} from './helpers'
export function resolveStringInput(type: StringSchemaType) {
return getOption(type, 'list') ? SelectInput : StringInput
}