Skip to content

Commit 6e4bf6f

Browse files
authored
chore(schema): add textarea studio type (#3687)
1 parent 695bd2e commit 6e4bf6f

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/types/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export interface ContentConfig {
4747
}
4848

4949
export interface EditorOptions {
50-
input?: 'media' | 'icon' // Override the default input for the field
50+
input?: 'media' | 'icon' | 'textarea' // Override the default input for the field
5151
hidden?: boolean // Do not display the field in the editor
5252
iconLibraries?: string[] // List of icon libraries to use for the icon input
5353
}

src/utils/preview/data.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { JSType, Schema, InputValue } from 'untyped'
33

44
export type ConfigInputsTypes
55
= | Exclude<JSType, 'symbol' | 'function' | 'any' | 'bigint'>
6-
| 'default' | 'icon' | 'file' | 'media' | 'component'
6+
| 'default' | 'icon' | 'file' | 'media' | 'component' | 'textarea'
77

88
export type PickerTypes = 'media-picker' | 'icon-picker'
99

@@ -73,6 +73,12 @@ const supportedFields: { [key in ConfigInputsTypes]: Schema } = {
7373
'@previewInput icon',
7474
],
7575
},
76+
textarea: {
77+
type: 'string',
78+
tags: [
79+
'@previewInput textarea',
80+
],
81+
},
7682
}
7783

7884
export type PreviewFieldData

0 commit comments

Comments
 (0)