Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 807 Bytes

Matrix.md

File metadata and controls

38 lines (31 loc) · 807 Bytes

Matrix

Displays a matrix of component permutations

import React from 'react'
import { Matrix } from '@compositor/kit'
import Button from '../src/Button'

export default props => (
  <Matrix
    component={Button}
    x={[
      { children: 'Hello' },
      { children: 'Hello', primary: true },
      { children: 'Hello', secondary: true },
      { children: 'Hello', error: true },
    ]}
    y={[
      {  size: 'small' },
      {  size: 'medium' },
      {  size: 'large' },
    ]}
  />
)

Props

name type description
component React component the component to render
x array an array of props objects to display on the x-axis
y array an array of props objects to display on the y-axis
width number width of each column