25 lines
589 B
TypeScript
25 lines
589 B
TypeScript
import CatalogueChoiceSelect from './catalogue-choice-select';
|
|
import { currencyChoices } from '@/lib/catalogue-choice';
|
|
export default function CurrencySelect({
|
|
codes,
|
|
...props
|
|
}: {
|
|
codes?: readonly string[];
|
|
value: string;
|
|
onChange: (value: string) => void;
|
|
label?: string;
|
|
id?: string;
|
|
disabled?: boolean;
|
|
required?: boolean;
|
|
error?: string;
|
|
className?: string;
|
|
}) {
|
|
return (
|
|
<CatalogueChoiceSelect
|
|
{...props}
|
|
label={props.label ?? 'Moeda'}
|
|
options={currencyChoices(codes)}
|
|
/>
|
|
);
|
|
}
|