diff --git a/src/frontend/src/components/common/InputText/InputText.tsx b/src/frontend/src/components/common/InputText/InputText.tsx index 6501f29c6..a0dcea513 100644 --- a/src/frontend/src/components/common/InputText/InputText.tsx +++ b/src/frontend/src/components/common/InputText/InputText.tsx @@ -10,6 +10,7 @@ import { convertLabelToId } from '../../../utils/helper.util'; import { faUpRightFromSquare } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { TextInputType } from '../../../constant/constant'; +import { TextType } from '../../../types/types/text.type'; interface InputTextProps { id?: string; @@ -18,7 +19,7 @@ interface InputTextProps { linkText?: string; linkHref?: string; hasIcon?: boolean; - type?: TextInputType; + type?: TextType; className?: string; value?: string | null; placeholder?: string; diff --git a/src/frontend/src/components/common/Table/interfaces.ts b/src/frontend/src/components/common/Table/interfaces.ts index e876e9150..8fec94b29 100644 --- a/src/frontend/src/components/common/Table/interfaces.ts +++ b/src/frontend/src/components/common/Table/interfaces.ts @@ -1,4 +1,4 @@ -import { TextInputType } from '../../../constant/constant'; +import { TextType } from '../../../types/types/text.type'; export interface ColumnMetaData { key: string; @@ -7,7 +7,7 @@ export interface ColumnMetaData { isDisable?: boolean; className?: string; hint?: string; - type?: TextInputType; + type?: TextType; } // default tabular data format - [{key1: value1, key2: value2}] diff --git a/src/frontend/src/constant/constant.ts b/src/frontend/src/constant/constant.ts index f281377ae..2421316c0 100644 --- a/src/frontend/src/constant/constant.ts +++ b/src/frontend/src/constant/constant.ts @@ -280,7 +280,7 @@ export const ApprovalRoles: IapprovalRoles = { export enum TextInputType { INPUT_TEXT = 'text', - INPUT_TEXT_AREA = 'textArea', + INPUT_TEXT_AREA = 'textarea', INPUT_EMAIL = 'email', } @@ -289,4 +289,4 @@ export enum SubmitButtonTextEnum { FORM = 'Submit', FINISH_REVIEW = 'Finish review', COMPLETE_PIA = 'Complete PIA', -} \ No newline at end of file +} diff --git a/src/frontend/src/types/types/text.type.ts b/src/frontend/src/types/types/text.type.ts new file mode 100644 index 000000000..1f0273e8a --- /dev/null +++ b/src/frontend/src/types/types/text.type.ts @@ -0,0 +1 @@ +export type TextType = 'text' | 'textarea' | 'email';