1.0.0 • Published 4 years ago
@aligov/list-item v1.0.0
@aligov/list-item
Install
$ npm install @aligov/list-item --save
Usage
import ListItem from '@aligov/list-item';
API
Props
name | type | default | describe |
---|---|---|---|
type | String | 'Common' | 列表 Item 类型,分为简单 Item(一行 Item)、双行 Item、复杂 Item(左边图标,中间是标题+描述, 右边是箭头) |
img | String | '' | 列表 Item 左边的图标,只有在复杂 Item 的情况下才会展示,默认为空背景 |
title | String | '' | 标题 |
descripe | String | '' | 描述,注意: 简单 Item 不包含 descripe |
arrow | String | 'Down' | 箭头方向(右,上,下), 可选 horizontal,up,down,empty,如果是 empty 则不显示 |
onClick | Function | void | 点击事件 |
Function
name | param | return | describe |
---|---|---|---|
name | Object | / | describe |
Example
import { createElement, render } from 'rax';
import DriverUniversal from 'driver-universal';
import ListItem from '@aligov/list-item';
render(<ListItem title="标题" descripe="描述" />, document.body, { driver: DriverUniversal });
1.0.0
4 years ago