Skip to main content

Table

Components

Table()

Table(props, context?): ReactNode

The Table component makes it easy to display data in a tabular format with rows and columns.

Parameters

ParameterType
propsTableProps
context?any

Returns

ReactNode

Example

const theadValues = [
<Text key={0}>Song</Text>,
<Text key={1}>Artist</Text>,
<Text key={2}>Year</Text>,
];

const rows = [
{
value: [
<Text key={0}>The Sliding Mr. Bones (Next Stop, Pottersville)</Text>,
<Text key={1}>Malcolm Lockyer</Text>,
<Text key={2}>1961</Text>,
],
clickHandler: () => {},
},
{
value: [
<Text key={0}>Witchy woman</Text>,
<Text key={1}>The Eagles</Text>,
<Text key={2}>1972</Text>,
],
clickHandler: () => {},
},
{
value: [
<Text key={0}>Shining Star</Text>,
<Text key={1}>Earth, Wind, and Fire</Text>,
<Text key={2}>1975</Text>,
],
clickHandler: () => {},
},
];
<Table
theadValues={theadValues}
rows={rows}
/>

Source

libs/design-system-core/src/components/Table/index.tsx:63

Props

TableProps

TableProps: object

Type declaration

MemberType
customTdStylestring
customThStylestring
rowsTDataValues[]
tableTitlestring
theadValuesReact.ReactNode[]

Source

libs/design-system-core/src/components/Table/index.tsx:8