Files
cunningham/packages/react/src/components/Forms/Select/index.tsx

14 lines
448 B
TypeScript
Raw Normal View History

import React from "react";
import { SelectMulti } from ":/components/Forms/Select/multi";
import { SelectMono, SelectProps } from ":/components/Forms/Select/mono";
export const Select = (props: SelectProps) => {
if (props.defaultValue && props.value) {
throw new Error(
"You cannot use both defaultValue and value props on Select component"
);
}
return props.multi ? <SelectMulti {...props} /> : <SelectMono {...props} />;
};