Section.tsx (525B)
1 import classNames from '@/lib/classnames' 2 import { HTMLAttributes } from 'react' 3 import styles from './Section.module.css' 4 5 export interface SectionProps extends HTMLAttributes<HTMLDivElement> { 6 hasMarginTop?: boolean 7 } 8 9 export default function Section (props: SectionProps) { 10 const { className, hasMarginTop, ...restProps } = props 11 12 return ( 13 <div 14 {...classNames( 15 className, 16 styles['section'], 17 hasMarginTop ? styles['has-margin-top'] : null, 18 )} 19 {...restProps} 20 /> 21 ) 22 }