Files
lti-web-client/src/components/table/TableRowSizeSelector.tsx
T

34 lines
685 B
TypeScript

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>
);
};