feat: add New Field Step 2 form (#2138)

Closes #2001

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Thaïs
2023-10-21 13:28:15 +02:00
committed by GitHub
parent c90cf1eb8f
commit 34bbbdff41
15 changed files with 367 additions and 34 deletions

View File

@ -1,16 +1,7 @@
import { css, useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import {
IconCheck,
IconLink,
IconNumbers,
IconPlug,
IconSocial,
IconUserCircle,
} from '@/ui/display/icon';
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
import { dataTypes } from '../../constants/dataTypes';
import { ObjectFieldDataType } from '../../types/ObjectFieldDataType';
const StyledDataType = styled.div<{ value: ObjectFieldDataType }>`
@ -32,18 +23,6 @@ const StyledDataType = styled.div<{ value: ObjectFieldDataType }>`
: ''}
`;
const dataTypes: Record<
ObjectFieldDataType,
{ label: string; Icon: IconComponent }
> = {
boolean: { label: 'True/False', Icon: IconCheck },
number: { label: 'Number', Icon: IconNumbers },
relation: { label: 'Relation', Icon: IconPlug },
social: { label: 'Social', Icon: IconSocial },
teammate: { label: 'Teammate', Icon: IconUserCircle },
text: { label: 'Text', Icon: IconLink },
};
type SettingsObjectFieldDataTypeProps = {
value: ObjectFieldDataType;
};