import React from 'react' ; import { withClassDefault , withClassModifier , compose , identity , } from '@axa-fr/react-toolkit-core' ; import SectionRestitutionTitle from './SectionRestitutionTitle' ; const DEFAULT_CLASSNAME = 'col col-sm-12 col-md-12 col-lg-12 col-xl-12' ; type SectionRestitutionRowBaseProps = { children ? : React . ReactNode ; title ? : React . ReactNode ; classNameContainer ? : string ; className ? : string ; } ; const SectionRestitutionRow = ( { title , className , classNameContainer , children , } ) => ( < div className = { className } > { title && < SectionRestitutionTitle title = { title } />} < div className = { classNameContainer } > { children } < /div> < /div>); const enhance = compose ( identity < SectionRestitutionRowBaseProps > ( ) , withClassDefault ( DEFAULT_CLASSNAME ) , withClassModifier ( ) ) ; const defaultProps = { children : null , classNameContainer : 'row af-restitution__content-left' , className : DEFAULT_CLASSNAME , } ; const Enhanced = enhance ( SectionRestitutionRow ) ; Enhanced . displayName = 'SectionRestitutionRow' ; Enhanced . defaultProps = defaultProps ; export default Enhanced ;