import React from 'react' ; import classnames from 'classnames' ; import { cssClasses } from './constants' ; export interface SectionProps < T > extends React . HTMLProps < T > { align ? : 'start' | 'end' ; className ? : string ; tag ? : string ; } const Section = ( { align , className , children , tag : Tag = 'section' , ... otherProps } ) => ( < Tag className = { classnames ( className , cssClasses . SECTION , { [ cssClasses . SECTION_START ] : align === 'start' , [ cssClasses . SECTION_END ] : align === 'end' , } ) } { ... otherProps } > { children } < /Tag>); export default Section ;