UNPKG

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
import {type NumberSchemaType} from '@sanity/types' import {NumberInput} from '../../inputs/NumberInput' import {SelectInput} from '../../inputs/SelectInput' import {getOption} from './helpers' export function resolveNumberInput(type: NumberSchemaType) { return getOption(type, 'list') ? SelectInput : NumberInput }