1.0.0 • Published 4 years ago

@aligov/list-item v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

@aligov/list-item

Install

$ npm install @aligov/list-item --save

Usage

import ListItem from '@aligov/list-item';

API

Props

nametypedefaultdescribe
typeString'Common'列表 Item 类型,分为简单 Item(一行 Item)、双行 Item、复杂 Item(左边图标,中间是标题+描述, 右边是箭头)
imgString''列表 Item 左边的图标,只有在复杂 Item 的情况下才会展示,默认为空背景
titleString''标题
descripeString''描述,注意: 简单 Item 不包含 descripe
arrowString'Down'箭头方向(右,上,下), 可选 horizontal,up,down,empty,如果是 empty 则不显示
onClickFunctionvoid点击事件

Function

nameparamreturndescribe
nameObject/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 });