feat: update app configuration and enhance UI components
This commit is contained in:
26
components/AppDatePicker.tsx
Normal file
26
components/AppDatePicker.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React from 'react';
|
||||
import DateTimePicker, { useDefaultStyles } from 'react-native-ui-datepicker';
|
||||
import { ChevronLeft, ChevronRight } from 'lucide-react-native';
|
||||
|
||||
type AppDatePickerProps = React.ComponentProps<typeof DateTimePicker>;
|
||||
|
||||
export const AppDatePicker = (props: AppDatePickerProps) => {
|
||||
const defaultStyles = useDefaultStyles('light');
|
||||
|
||||
return (
|
||||
<DateTimePicker
|
||||
{...props}
|
||||
locale="it"
|
||||
components={{
|
||||
IconPrev: <ChevronLeft size={24} color="#1f2937" />,
|
||||
IconNext: <ChevronRight size={24} color="#1f2937" />,
|
||||
...props.components,
|
||||
}}
|
||||
styles={{
|
||||
...defaultStyles,
|
||||
selected: { backgroundColor: '#099499' },
|
||||
...props.styles,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user