mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-21 13:55:45 +00:00
40 lines
857 B
TypeScript
40 lines
857 B
TypeScript
import SelectInput from '@/components/input/SelectInput';
|
|
import { cn } from '@/lib/helper';
|
|
|
|
export interface OptionType {
|
|
label: string;
|
|
value: string | number;
|
|
}
|
|
|
|
interface TableRowSizeSelectorProps {
|
|
value: number;
|
|
onChange: (val: OptionType | OptionType[] | null) => void;
|
|
options: OptionType[];
|
|
children?: React.ReactNode;
|
|
className?: string;
|
|
}
|
|
|
|
export const TableRowSizeSelector = ({
|
|
value,
|
|
onChange,
|
|
options,
|
|
children,
|
|
className,
|
|
}: TableRowSizeSelectorProps) => {
|
|
return (
|
|
<div className={cn('flex flex-row gap-3 items-end justify-end', className)}>
|
|
{children}
|
|
<SelectInput
|
|
label='Baris'
|
|
options={options}
|
|
value={{
|
|
label: String(value),
|
|
value: value,
|
|
}}
|
|
onChange={onChange}
|
|
className={{ wrapper: 'max-w-28' }}
|
|
/>
|
|
</div>
|
|
);
|
|
};
|