dify/web/app/components/base/date-and-time-picker/time-picker/footer.tsx
Stephen Zhou 6d0e36479b
refactor(i18n): use JSON with flattened key and namespace (#30114)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-12-29 14:52:32 +08:00

38 lines
964 B
TypeScript

import type { FC } from 'react'
import type { TimePickerFooterProps } from '../types'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import Button from '../../button'
const Footer: FC<TimePickerFooterProps> = ({
handleSelectCurrentTime,
handleConfirm,
}) => {
const { t } = useTranslation()
return (
<div className="flex items-center justify-between border-t-[0.5px] border-divider-regular p-2">
{/* Now Button */}
<Button
variant="secondary-accent"
size="small"
className="mr-1 flex-1"
onClick={handleSelectCurrentTime}
>
{t('operation.now', { ns: 'time' })}
</Button>
{/* Confirm Button */}
<Button
variant="primary"
size="small"
className="ml-1 flex-1"
onClick={handleConfirm.bind(null)}
>
{t('operation.ok', { ns: 'time' })}
</Button>
</div>
)
}
export default React.memo(Footer)