2.2.1 • Published 4 years ago

@pridgey/ui-gridcontainer v2.2.1

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

@pridgey/ui-gridcontainer

The GridContainer component contains items in a CSS Grid container.

Basic Usage

<GridContainer>
  <div>one</div>
  <div>two</div>
  <div>three</div>
</GridContainer>

GridContainerProps

Prop NameTypeDescription
childrenReact.ReactChild[]The children to wrap in the grid container.
Rows?number or stringThe rows configuration. If a number it will create that many equal height rows.
Columns?number or stringThe columns configuration. If a number it will create that many equal width columns.
Areas?string[]The grid-areas configuration. Each index of the array is representative of a row.
AlignItems?Accepts a single string: "stretch", "center", "flex-start", "flex-end", "baseline" or an object with Desktop and Mobile option: { Desktop: "center", Mobile: "flex-end" }.The alignment of the items in the grid container. Defaults to "center".
JustifyItems?Accepts a single string: "stretch", "center", "flex-start", "flex-end", "baseline" or an object with Desktop and Mobile option: { Desktop: "space-between", Mobile: "center" }.The justification of items in the grid container. Defaults to "center".
ColumnAndRowGap?number or stringThe amount of spacing between columns and rows.
ColumnGap?number or stringThe amount of spacing between columns.
RowGap?number or stringThe amount of spacing between rows.
Margin?number or stringThe amount of margin of the grid container.
Padding?number or stringThe amount of padding in the grid container.
Width?number or stringThe width of the grid container.
Height?number or stringThe height of the grid container.