vchikalkin a8684087cf packages/ui: add textarea
fix element container position
apps/web: add webkit scroll style
move comment element to end of form
use textarea element for comment
2023-11-22 15:36:08 +03:00

15 lines
360 B
TypeScript

import type { MetaObject } from '@/api/ius/types';
import { Checkbox, Input, InputNumber, Textarea } from 'ui';
function wrapMap<C, T extends Record<MetaObject['fieldType'], C>>(arg: T) {
return arg;
}
export const mapFieldTypeElement = wrapMap({
CHECKBOX: Checkbox,
DECIMAL: InputNumber,
INT: InputNumber,
STRING: Input,
TEXTAREA: Textarea,
});