import React, { FunctionComponent } from 'react' import { Text, TouchableOpacity } from 'react-native'; import { useConfig } from '../configprovider'; import timePannelStyles from './styles'; export interface TimePannelProps { date: string curKey: string | number className?: string change: (curKey: string | number) => void } const defaultProps = { className: '', date: '', curKey: 0, } as TimePannelProps export const TimePannel: FunctionComponent< Partial & React.HTMLAttributes > = (props) => { const { children, className, date, curKey, change } = { ...defaultProps, ...props, } const { theme } = useConfig(); const mStyles = timePannelStyles(theme); return ( change(curKey)}> {date} ) } TimePannel.defaultProps = defaultProps TimePannel.displayName = 'NutTimePannel'