first commit
This commit is contained in:
commit
34ea15a54d
246 changed files with 18660 additions and 0 deletions
24
frontend/src/components/ui/Container.jsx
Normal file
24
frontend/src/components/ui/Container.jsx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { cn } from '../../utils/cn'
|
||||
|
||||
const widths = {
|
||||
default: 'max-w-content',
|
||||
narrow: 'max-w-editorial',
|
||||
prose: 'max-w-prose',
|
||||
full: 'max-w-none',
|
||||
}
|
||||
|
||||
export function Container({ as = 'div', width = 'default', className, children, ...props }) {
|
||||
const Tag = as
|
||||
return (
|
||||
<Tag
|
||||
className={cn(
|
||||
'mx-auto w-full px-gutter sm:px-gutter-md lg:px-gutter-lg',
|
||||
widths[width],
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</Tag>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue