(react) make DatePicker elements accessible

Declare and export reusable element from the DatePicker
sub-packages, to make them easily usable accros
the design system or any application.
This commit is contained in:
Lebaud Antoine
2023-06-16 17:08:12 +02:00
committed by aleb_the_flash
parent 52bd807b27
commit f8326c5de6
5 changed files with 10 additions and 10 deletions

View File

@@ -23,7 +23,7 @@ export type DatePickerProps = DatePickerAuxSubProps & {
onChange?: (value: string | null) => void | undefined;
};
const DatePicker = (props: DatePickerProps) => {
export const DatePicker = (props: DatePickerProps) => {
if (props.defaultValue && props.value) {
throw new Error(
"You cannot use both defaultValue and value props on DatePicker component"
@@ -82,5 +82,3 @@ const DatePicker = (props: DatePickerProps) => {
</DatePickerAux>
);
};
export default DatePicker;