Files
heygermany-e2e-mrg5ilhk/apps/website/components/common/EnumSelect.tsx
e2e 40352e4179
Some checks failed
Main / Setup and Test (push) Has been cancelled
Main / Build Website (push) Has been cancelled
chore: heygermany customer project
2026-07-11 11:17:38 +02:00

26 lines
549 B
TypeScript

import { useI18n } from '@/context/i18n-provider';
import { Select, SelectProps } from '@pikku/mantine/core';
interface EnumSelectProps extends Omit<SelectProps, 'data'> {
enumObject: Record<string, string>;
enumName: string;
label?: any;
placeholder?: any;
}
export const EnumSelect: React.FC<EnumSelectProps> = ({
enumObject,
enumName,
...selectProps
}) => {
const t = useI18n()
const options = t.getEnumOptions(enumObject, enumName);
return (
<Select
{...(selectProps as any)}
data={options}
/>
);
};