Skip to content

Commit

Permalink
init Block UI component
Browse files Browse the repository at this point in the history
  • Loading branch information
bozzhik committed Aug 9, 2024
1 parent ba191cb commit 239d4bc
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/components/UI/Block.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {cn} from '@/lib/utils'
import Text from '#/UI/Text'

interface Props {
children: React.ReactNode
token: string
heading: string
text?: string
className?: string
}

export default function Block({children, token, heading, text, className}: Props) {
return (
<section data-section={token} className={cn('space-y-6', className)}>
<div className="space-y-3 group w-fit">
<Text type="heading" className="flex items-center">
{heading}
</Text>

{text && <Text>{text}</Text>}
</div>

{children}
</section>
)
}

0 comments on commit 239d4bc

Please sign in to comment.