3.0.0 • Published 7 years ago

fyndiq-component-table v3.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

fyndiq-component-table npm

Preview

A Table component for Fyndiq

Installation

The component can be installed through NPM:

npm i -S fyndiq-component-table

Usage

import React from 'react'
import { Table, Row, Cell } from 'fyndiq-component-table'

// Normal usage
<Table>
  <Row head>
    <Cell>Column 1</Cell>
    <Cell>Column 2</Cell>
    <Cell>Column 3</Cell>
  </Row>
  <Row>
    <Cell>Row 1 - Column 1</Cell>
    <Cell>Row 1 - Column 2</Cell>
    <Cell>Row 1 - Column 3</Cell>
  </Row>
  <Row>
    <Cell>Row 2 - Column 1</Cell>
    <Cell>Row 2 - Column 2</Cell>
    <Cell>Row 2 - Column 3</Cell>
  </Row>
</Table>

API

Table

The component Table has the following customizable props:

NameTypeDescriptionDefault value
classNameStringAdditional classname''
childrenNodeContent of the table''

Row

The component Row has the following customizable props:

NameTypeDescriptionDefault value
classNameStringAdditional classname''
 size StringVertical size of the row. Can be s, m or l m
headBoolIf set to true, will render a headerfalse
interactiveBoolIf set to true, will visually react to mouse overfalse
noBorderBoolIf set to true, will not add a bottom borderfalse
verticalCenterBoolControls the vertical centering of the contenttrue
childrenNodeContent of the row''

Cell

The component Cell has the following customizable props:

NameTypeDescriptionDefault value
classNameStringAdditional classname''
centerBoolControls the text-align of the cell''
childrenNodeContent of the cell''
3.0.0

7 years ago

3.0.0-beta.6

8 years ago

3.0.0-beta.5

8 years ago

3.0.0-beta.4

8 years ago

3.0.0-beta.3

8 years ago

3.0.0-beta.2

8 years ago

3.0.0-beta.1

8 years ago

3.0.0-beta.0

8 years ago

2.1.0

8 years ago