3.1.25 • Published 5 years ago

the-list v3.1.25

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

the-list

Build Status npm Version JS Standard

List of the-components

Installation

$ npm install the-list --save

Usage

Live Demo is hosted on GitHub Page

'use strict'

import React from 'react'
import { TheListGroup, TheList, TheListStyle } from 'the-list'
import { TheSpinStyle } from 'the-spin'
import { TheRouter } from 'the-router'

const IMAGE_URL = 'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/02.jpg'

class ExampleComponent extends React.PureComponent {
  render () {
    const {Item} = TheList
    return (
      <div>
        <TheRouter.Hash>
          <TheSpinStyle/>
          <TheListStyle/>
          <TheListGroup>
            <TheListGroup.Header>Normal List</TheListGroup.Header>
            <TheListGroup.Body>
              <TheList>
                <Item disclosure>Foo</Item>
                <Item>Bar</Item>
                <Item disclosure>This is a very very very very very very very very very very
                  very very very very very very very very very very very long
                  content!</Item>
                <Item to='/about' disclosure>about</Item>
                <Item thumbnail={IMAGE_URL} disclosure>With Image</Item>
                <Item icon='fas fa-car'
                      onThumbnail={() => console.log('Thumbnail clicked')}
                      thumbnail={IMAGE_URL} disclosure>With Icon</Item>

                <Item title='This is Title'
                      subTitle='This is Sub title'
                      appendix='This is appendix'
                />

                <Item title='This is Title'
                      subTitle='This is Sub title'
                >With sub content</Item>
              </TheList>
              <TheList alt={'This is empty list'}>
              </TheList>
            </TheListGroup.Body>

            <TheListGroup.Header>Horizontal List</TheListGroup.Header>
            <TheListGroup.Body>
              <TheList horizontal>
                <Item disclosure>Foo</Item>
                <Item>Bar</Item>
                <Item disclosure>This is a very very very very very very very very very very
                  very very very very very very very very very very very long
                  content!</Item>
                <Item to='/about' disclosure>about</Item>
                <Item thumbnail={IMAGE_URL} disclosure>With Image</Item>

                <Item title='This is Title'
                      subTitle='This is Sub title'
                />

                <Item title='This is Title'
                      subTitle='This is Sub title'
                >With sub content</Item>

                <Item title='This is Title'
                      subTitle='This is Sub title'
                      appendix={'This is appendix'}
                >With sub content</Item>
              </TheList>
            </TheListGroup.Body>
          </TheListGroup>
        </TheRouter.Hash>
      </div>

    )
  }
}

export default ExampleComponent

Components

TheList

List components

Props

NameTypeDescriptionDefault
altnode'No Data Found'
horizontalboolfalse
spinningboolfalse
role'list'

TheListGroup

Group of list

Props

NameTypeDescriptionDefault
role'group'

TheListItem

Item of list

Props

NameTypeDescriptionDefault
appendixnodeAppendixnull
borderlessboolRender with borderless stylefalse
disclosureboolShow disclosure iconfalse
iconstringIcon class
subTitlenodeSub title textnull
thumbnailstringThumbnail image urlnull
thumbnailHeightunionHeight of thumbnail72
thumbnailWidthunionWidth of thumbnail72
titlenodeTitle textnull
tounionLink tonull
onThumbnailnull
role'listitem'

TheListStyle

Style for TheList

Props

NameTypeDescriptionDefault
optionsobjectStyle options{}

License

This software is released under the MIT License.

Links

3.1.25

5 years ago

3.1.24

5 years ago

3.1.23

5 years ago

3.1.22

5 years ago

3.1.21

6 years ago

3.1.20

6 years ago

3.1.19

6 years ago

3.1.18

6 years ago

3.1.17

6 years ago

3.1.16

6 years ago

3.1.15

6 years ago

3.1.14

6 years ago

3.1.13

6 years ago

3.1.12

6 years ago

3.1.11

6 years ago

3.1.10

6 years ago

3.1.9

6 years ago

3.1.8

6 years ago

3.1.7

6 years ago

3.1.6

6 years ago

3.1.5

6 years ago

3.1.4

6 years ago

3.1.3

6 years ago

3.1.2

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.0

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago