feat(FE-64): refactor MovementTable with new TableToolbar and TableRowSizeSelector components

This commit is contained in:
rstubryan
2025-10-14 09:26:21 +07:00
parent a4ff4f7b2a
commit 44e07ddc50
4 changed files with 249 additions and 208 deletions
@@ -0,0 +1,33 @@
import SelectInput from '../input/SelectInput';
export interface OptionType {
label: string;
value: string | number;
}
interface TableRowSizeSelectorProps {
value: number;
onChange: (val: OptionType | OptionType[] | null) => void;
options: OptionType[];
}
export const TableRowSizeSelector = ({
value,
onChange,
options,
}: TableRowSizeSelectorProps) => {
return (
<div className='flex flex-row justify-end'>
<SelectInput
label='Baris'
options={options}
value={{
label: String(value),
value: value,
}}
onChange={onChange}
className={{ wrapper: 'max-w-28' }}
/>
</div>
);
};