3.0.1 • Published 1 year ago

@jouwomgeving/ui-list v3.0.1

Weekly downloads
28
License
UNLICENSED
Repository
bitbucket
Last release
1 year ago

ui-list

Usage

import React from 'react';
import * as List from '@jouwomgeving/ui-list';

function Layout() {
  return (
    <List.Container>
      <List.Row>
        <List.Cell>
          Header
        </List.Cell>
      </List.Row>
      <List.Delimiter />
      <List.Row>
        <List.Cell
          width="120px"
          weight="0"
        >
          Column 1
        </List.Cell>
        <List.Cell>
          Column 2
        </List.Cell>
      </List.Row>
      <List.Delimiter type="secondary" />
      <List.Row>
        <List.Cell
          width="120px"
          weight="0"
        >
          Column 1
        </List.Cell>
        <List.Cell>
          Column 2
        </List.Cell>
      </List.Row>
      <List.Delimiter type="secondary" />
    </List.Container>
  )
}

export default Layout;

Container

About

Basic container for ui-list, this exist just for the document structure of this project, so it will behave like a real list in the document.

PropTypes

PropsValuesDefaultRequired
childrenReactElementYes

Delimiter

About

The Delimiter for the list components, this supports the two kinds of JO Delimiters; 1. Primary 2. Secondary

PropTypes

PropsValuesDefaultRequired
typeprimary, secondaryprimaryNo

Row

About

A wrapper which creates a full accessible row for the ui-list package.

The component also exposes some event handlers:

  1. onSelect | onDeselect
    Will be triggered when there is a select or deselect event happening, this can be controlled with the selected property.
  2. onHover
    This can be used to listen to hover events within the component.
  3. onFocus This can be used to listen to focus events within the component.
  4. onClick The normal onClick handler

PropTypes

PropsValuesDefaultRequired
childrenReactElementYes
onSelectfunctionNo
onDeselectfunctionNo
selectedbooleanNo
onHoverfunctionNo
onFocusfunctionNo
onClickfunctionNo

Cell

About

A Cell for usage within the Row component.

PropTypes

PropsValuesDefaultRequired
childrenReactElementYes
sizeCSS unit100%Yes
weight0, 1, 21Yes
verticaltop, center, bottomtopNo
3.0.1

1 year ago

3.0.0

1 year ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.3-beta

9 years ago