mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-22 06:15:47 +00:00
feat(FE-64): refactor MovementTable with new TableToolbar and TableRowSizeSelector components
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user