UNPKG

@sanity/code-input

Version:

Sanity input component for code, powered by CodeMirror

36 lines (32 loc) 589 B
import {ObjectSchemaType} from 'sanity' export interface CodeInputLanguage { title: string value: string mode?: string } /** * @public */ export interface CodeInputValue { _type?: 'code' code?: string filename?: string language?: string highlightedLines?: number[] } /** * @public */ export interface CodeOptions { theme?: string darkTheme?: string languageAlternatives?: CodeInputLanguage[] language?: string withFilename?: boolean } /** * @public */ export interface CodeSchemaType extends Omit<ObjectSchemaType, 'options'> { options?: CodeOptions }