footer.tsx 703 B

1234567891011121314151617181920212223242526
  1. import type { FC } from 'react'
  2. import React from 'react'
  3. import Button from '../../button'
  4. import type { YearAndMonthPickerFooterProps } from '../types'
  5. import { useTranslation } from 'react-i18next'
  6. const Footer: FC<YearAndMonthPickerFooterProps> = ({
  7. handleYearMonthCancel,
  8. handleYearMonthConfirm,
  9. }) => {
  10. const { t } = useTranslation()
  11. return (
  12. <div className='grid grid-cols-2 gap-x-1 p-2'>
  13. <Button size='small' onClick={handleYearMonthCancel}>
  14. {t('time.operation.cancel')}
  15. </Button>
  16. <Button variant='primary' size='small' onClick={handleYearMonthConfirm}>
  17. {t('time.operation.ok')}
  18. </Button>
  19. </div>
  20. )
  21. }
  22. export default React.memo(Footer)