update food

This commit is contained in:
hamid zarghami
2025-11-15 14:45:04 +03:30
parent 0fd87e99f2
commit eaa9ef2a9a
18 changed files with 609 additions and 61 deletions
@@ -0,0 +1,42 @@
import { type FC } from 'react'
import type { FormikProps } from 'formik'
import { Checkbox } from '@/components/ui/checkbox'
import type { CreateFoodType } from '../types/Types'
type MealTimesSectionProps = {
formik: FormikProps<CreateFoodType>
}
const MealTimesSection: FC<MealTimesSectionProps> = ({ formik }) => {
return (
<div className='mt-6'>
<div className='text-sm mb-3'>وعدههای غذایی</div>
<div className='flex gap-6 flex-wrap'>
<div className='flex items-center gap-2'>
<Checkbox
checked={formik.values.breakfast}
onCheckedChange={(checked) => formik.setFieldValue('breakfast', checked)}
/>
<label className='text-xs cursor-pointer'>صبحانه</label>
</div>
<div className='flex items-center gap-2'>
<Checkbox
checked={formik.values.noon}
onCheckedChange={(checked) => formik.setFieldValue('noon', checked)}
/>
<label className='text-xs cursor-pointer'>ناهار</label>
</div>
<div className='flex items-center gap-2'>
<Checkbox
checked={formik.values.dinner}
onCheckedChange={(checked) => formik.setFieldValue('dinner', checked)}
/>
<label className='text-xs cursor-pointer'>شام</label>
</div>
</div>
</div>
)
}
export default MealTimesSection