feat: simplify field preview logic in Settings (#5541)
Closes #5382 TODO: - [x] Test all field previews in app - [x] Fix tests - [x] Fix JSON preview
This commit is contained in:
@ -32,10 +32,7 @@ export type SettingsFieldTypeConfig = {
|
||||
defaultValue?: unknown;
|
||||
};
|
||||
|
||||
export const SETTINGS_FIELD_TYPE_CONFIGS: Record<
|
||||
SettingsSupportedFieldType,
|
||||
SettingsFieldTypeConfig
|
||||
> = {
|
||||
export const SETTINGS_FIELD_TYPE_CONFIGS = {
|
||||
[FieldMetadataType.Uuid]: {
|
||||
label: 'Unique ID',
|
||||
Icon: IconKey,
|
||||
@ -137,6 +134,9 @@ export const SETTINGS_FIELD_TYPE_CONFIGS: Record<
|
||||
[FieldMetadataType.RawJson]: {
|
||||
label: 'JSON',
|
||||
Icon: IconJson,
|
||||
defaultValue: `{ "key": "value" }`,
|
||||
defaultValue: { key: 'value' },
|
||||
},
|
||||
};
|
||||
} as const satisfies Record<
|
||||
SettingsSupportedFieldType,
|
||||
SettingsFieldTypeConfig
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user