feat: add EnumFieldDisplay and Enum field preview (#2487)

Closes #2428

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Thaïs
2023-11-17 23:15:35 +01:00
committed by GitHub
parent e72917c69c
commit fea0bbeb2a
15 changed files with 200 additions and 18 deletions

View File

@ -8,6 +8,7 @@ import {
IconNumbers,
IconPhone,
IconPlug,
IconTag,
IconTextSize,
IconUser,
} from '@/ui/display/icon';
@ -52,6 +53,11 @@ export const dataTypes: Record<
Icon: IconCalendarEvent,
defaultValue: defaultDateValue.toISOString(),
},
[FieldMetadataType.Enum]: {
label: 'Select',
Icon: IconTag,
defaultValue: { color: 'green', text: 'Option 1' },
},
[FieldMetadataType.Currency]: {
label: 'Currency',
Icon: IconCoins,
@ -66,5 +72,4 @@ export const dataTypes: Record<
defaultValue: 50,
},
[FieldMetadataType.FullName]: { label: 'Full Name', Icon: IconUser },
[FieldMetadataType.Enum]: { label: 'Enum', Icon: IconPlug },
};