Table
Import
import Table from '@govuk-frederic/table';
Usage
Simple
<Table titles={arrayExampleHeadings} rows={arrayExampleContent} names={exampleNames} />
rowIncludesHeading
<Table titles={arrayExampleHeadings} rows={arrayExampleContent} rowIncludesHeading />
rowIncludesHeading, no titles
<Table rows={arrayExampleContent} rowIncludesHeading names={exampleNames} />
rowIncludesHeading, no titles, small single row
<Table rows={[['title', 'value']]} rowIncludesHeading />
rowIncludesHeading, with flexible columns
<Table titles={arrayExampleHeadings} rows={arrayExampleContent} flexibleColumns rowIncludesHeading />
Properties
Prop | Required | Default | Type | Description |
---|
flexibleColumns | | `````` | bool | |
name | | `````` | string | |
names | | [] | arrayOf[object Object] | |
rowIncludesHeading | | `````` | bool | |
rows | true | `````` | arrayOf[object Object] | |
titles | | `````` | arrayOf[object Object] | |