3.1.25 • Published 5 years ago
the-list v3.1.25
the-list
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
Name | Type | Description | Default |
---|---|---|---|
alt | node | 'No Data Found' | |
horizontal | bool | false | |
spinning | bool | false | |
role | 'list' |
TheListGroup
Group of list
Props
Name | Type | Description | Default |
---|---|---|---|
role | 'group' |
TheListItem
Item of list
Props
Name | Type | Description | Default |
---|---|---|---|
appendix | node | Appendix | null |
borderless | bool | Render with borderless style | false |
disclosure | bool | Show disclosure icon | false |
icon | string | Icon class |
|
subTitle | node | Sub title text | null |
thumbnail | string | Thumbnail image url | null |
thumbnailHeight | union | Height of thumbnail | 72 |
thumbnailWidth | union | Width of thumbnail | 72 |
title | node | Title text | null |
to | union | Link to | null |
onThumbnail | null | ||
role | 'listitem' |
TheListStyle
Style for TheList
Props
Name | Type | Description | Default |
---|---|---|---|
options | object | Style 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