1.3.5 • Published 4 years ago

@bdt-component-library/grid v1.3.5

Weekly downloads
65
License
MIT
Repository
github
Last release
4 years ago

Grid Component

About

This is a component published as its own package from our component library monorepo: https://github.com/BenefitsDataTrust/ui-components. Setup instructions, as well as higher-level goals and concerns can be found from the main project README.

Description

A basic Grid component structure built on top of flex-box from which we can build other types of layout/structure components and/or use to layout regular components.

API

proptyperequireddefaultexplanation
childrenReact nodeyesn/aThe component to receive the grid layout effects
alignItemsenum("items-start", "items-end", "items-center", "items-baseline", "items-stretch")non/aDetermines the align-items flexbox attribute
classNamestringnon/aAdds an optional classname to the main component
directionenum("row", "column")no"row"Determines the directional layout inside the grid
justifyContentenum("justify-start", "justify-end", "jsutify-center", "justify-between", "justify-around", "justify-evenly")non/aDetermines the justify-content flexbox attribute
spacingenum(0, 1, 2, 3, 4)no1Determines the spacing between children passed into the Grid component (0 means no spacing)
wrapenum("wrap", "no-wrap")no"wrap"Determines if flex-wrap attribute is applied