Portal/rsconcept/frontend/src/dialogs/DlgEditOperation/TabOperation.tsx

46 lines
1.3 KiB
TypeScript
Raw Normal View History

2024-07-29 16:55:48 +03:00
import TextArea from '@/components/ui/TextArea';
import TextInput from '@/components/ui/TextInput';
import AnimateFade from '@/components/wrap/AnimateFade';
interface TabOperationProps {
alias: string;
onChangeAlias: (newValue: string) => void;
2024-07-29 16:55:48 +03:00
title: string;
onChangeTitle: (newValue: string) => void;
2024-07-29 16:55:48 +03:00
comment: string;
onChangeComment: (newValue: string) => void;
2024-07-29 16:55:48 +03:00
}
function TabOperation({ alias, onChangeAlias, title, onChangeTitle, comment, onChangeComment }: TabOperationProps) {
2024-07-29 16:55:48 +03:00
return (
<AnimateFade className='cc-column'>
<TextInput
id='operation_title'
label='Полное название'
value={title}
onChange={event => onChangeTitle(event.target.value)}
2024-07-29 16:55:48 +03:00
/>
<div className='flex gap-6'>
<TextInput
id='operation_alias'
label='Сокращение'
2024-08-22 23:23:26 +03:00
className='w-[16rem]'
value={alias}
onChange={event => onChangeAlias(event.target.value)}
/>
2024-07-29 16:55:48 +03:00
<TextArea
id='operation_comment'
label='Описание'
noResize
rows={3}
value={comment}
onChange={event => onChangeComment(event.target.value)}
2024-07-29 16:55:48 +03:00
/>
</div>
</AnimateFade>
);
}
export default TabOperation;