krc-list-view
v1.0.6
Published
Kraken react controls - list view
Downloads
10
Maintainers
Readme
krc-list-view
ReactJS controls: List view by Kraken team!
install
HOW IT WORKS
install package
npm install --save krc-list-view
import styles
import 'krc-list-view/styles.css';
usage
import { ListView } from "krc-list-view";
import 'krc-list-view/styles.css';
const itemTemplate = (item) => {
return <p>{item.text}</p>;
};
const items = [{
"text": "item1",
"price": 20
}, {
"text": "item2",
"price": 40
}]
<ListView
title={"List products"}
items={items}
pageSize={1}
itemTemplate={itemTemplate} />
API references
Properties
| Name | Type | Default | Description | | ------------ | -------- | ------- | ----------------------------------------------- | | title | string | null | List view title | | itemTemplate | Function | null | Item template fucntion, with input as item data | | items | Object[] | [] | Data items | | pageSize | number | 10 | Page view item count |
License
krc-list-view is released under the MIT license.