refactor home

This commit is contained in:
2026-07-21 11:16:33 +03:30
parent 17cb4afbca
commit fff5cd9146
15 changed files with 524 additions and 250 deletions
+34
View File
@@ -0,0 +1,34 @@
import { clx } from '@/helpers/utils'
import { type FC, type ReactNode } from 'react'
type HomeSectionProps = {
title?: string
children: ReactNode
className?: string
contentClassName?: string
}
const HomeSection: FC<HomeSectionProps> = ({
title,
children,
className,
contentClassName,
}) => {
return (
<section
className={clx(
'rounded-2xl bg-white p-4 md:rounded-3xl md:p-6',
className,
)}
>
{title ? (
<h2 className='text-base font-light md:text-lg'>{title}</h2>
) : null}
<div className={clx(title && 'mt-4 md:mt-6', contentClassName)}>
{children}
</div>
</section>
)
}
export default HomeSection