2023-06-12 14:27:40 +02:00
|
|
|
import React from "react";
|
|
|
|
|
import { SelectMulti } from ":/components/Forms/Select/multi";
|
|
|
|
|
import { SelectMono, SelectProps } from ":/components/Forms/Select/mono";
|
2023-05-05 16:04:50 +02:00
|
|
|
|
2023-06-12 14:27:40 +02:00
|
|
|
export const Select = (props: SelectProps) => {
|
2023-05-05 16:04:50 +02:00
|
|
|
if (props.defaultValue && props.value) {
|
|
|
|
|
throw new Error(
|
|
|
|
|
"You cannot use both defaultValue and value props on Select component"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-12 14:27:40 +02:00
|
|
|
return props.multi ? <SelectMulti {...props} /> : <SelectMono {...props} />;
|
2023-05-05 16:04:50 +02:00
|
|
|
};
|