Ingo Schommer c70590e50c Consolidated grid-field component
Every top-level folder in /components should be a standalone component.
This isn't the case for the grid-field-* ones, so they belong into the same folder.
See https://github.com/Automattic/wp-calypso/blob/master/docs/components.md

merge styles
2016-04-06 08:36:37 +12:00

49 lines
1.1 KiB
Markdown

# GridField
General purpose component for tabular data.
## GridFieldTableComponent
This component is used to display structured data in an extendible table layout.
**Required Props**
* **Headings** - (array) The column headings.
* **Rows** - (array) The table rows.
## GridFieldAction
This component renders a button within a grid-field to handle actions.
**Required Props**
* **handleClick** - Function for when a button is clicked
## GridFieldCell
This component represents a data cell in a GridFieldRow.
**Optional Props**
* **width** - Set a width relative to the other cells if required. Accepts a number from 1-10 (defaults to 5).
## GridFieldHeader
This component is used to display a table header row on a GridFieldComponent.
## GridFieldHeaderCell
This component is a cell in a GridFieldHeader component.
**Optional Props**
* **width** - Set a width relative to the other cells if required. Accepts a number from 1-10 (defaults to 5).
# GridFieldRow
Represents a row in a GridField.
**Optional Props**
* **cells** - (array) The table data to display in the row.