Closed omid-ebrahimi closed 5 years ago
I think this lib should support html5 elements (ex: section, article instead of div). 1- We can add an option to Box to specify element type. 2- We can also define new components (ex: FlexArticle, FlexSection). We can also implement both solutions.
You can use the as prop to change the underlying HTTML element (e.g. <Box as='header' />) see https://www.styled-components.com/docs/api#as-polymorphic-prop
as
<Box as='header' />
I think this lib should support html5 elements (ex: section, article instead of div). 1- We can add an option to Box to specify element type. 2- We can also define new components (ex: FlexArticle, FlexSection). We can also implement both solutions.