|
1
|
import React from "react" |
|
2
|
import clsx from "clsx" |
|
3
|
|
|
4
|
type WideSectionProps = React.AllHTMLAttributes<HTMLElement> & { |
|
5
|
as?: "div" | "main" |
|
6
|
} |
|
7
|
|
|
8
|
export const WideSection = ({ |
|
9
|
children, |
|
10
|
className, |
|
11
|
as = "div", |
|
12
|
}: WideSectionProps) => { |
|
13
|
const Component = as |
|
14
|
return ( |
|
15
|
<Component |
|
16
|
className={clsx( |
|
17
|
"max-w-inner-content-xs sm:max-w-inner-content-sm md:max-w-inner-content-md", |
|
18
|
"lg:max-w-lg-wide-content xl:max-w-xl-wide-content px-1 lg:px-0 mx-auto", |
|
19
|
className |
|
20
|
)} |
|
21
|
> |
|
22
|
{children} |
|
23
|
</Component> |
|
24
|
) |
|
25
|
} |