import React from 'react' ; import PropTypes from 'prop-types' ; import 'ProjectPlanner/Tiles.scss' ; export const Tiles = ( { children , minSize = 10 , ... rest } ) => { const style = { gridTemplateColumns : `repeat(auto-fill, minmax(${ minSize }em, 1fr))` , } ; return ( < div { ... rest } className = "tiles" style = { style } > { React . Children . map ( children , ( child ) => ( < div > { child } < /div>))} < /div>); } ; Tiles . propTypes = { minSize : PropTypes . number , } ; export default Tiles ;