-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
What:
I suggest to introduce an Area component to Atomic Layout.
Why:
Area component would act similarly to Box, but is designed to be used as a direct child of the templateless Composition. Area would accommodate the CSS Grid-related props (column, rowEnd, etc.).
I find this useful for scenarios when I need to align direct Composition children (i.e. specify a child's grid-column) without having to convert the Composition to use template/areas.
Usage example:
import { Composition, Area } from 'atomic-layout'
const Example = () => {
return (
<Composition templateCols="1fr 250px">
<Area columnStart={2}>Content</Area>
</Composition>
)
}Together with the polymorphic as prop the Area component may be used as an augment component that provides grid-related styles to any direct children.
Reactions are currently unavailable