on ga/patch help sign in
urbit.org/components/Section.js
21 lines 436 B history raw
1import classnames from "classnames";
3// Provides a flexible layout building block
4export default function Section({
5 children,
6 className = "",
7 short = false,
8 narrow = false,
9}) {
10 const spacing = classnames({
11 "py-8": short,
12 "py-20": !short,
13 "layout-narrow": narrow,
14 layout: !narrow,
15 });
16 return (
17 <section className={`w-full px-4 md:px-8 ${spacing} ${className}`}>
18 {children}
19 </section>
20 );