zilly-ui
Version: 
Zilly web react ui components
43 lines (34 loc) • 1.26 kB
text/mdx
---
name: Notification
---
import { Playground, Props } from "docz";
import  Notification  from "./index";
# Notification
## Props
| Property | Description | Type | Default |
:---|:---|:---|:---|
| title | Notification title | string | - |
| hasmore | isshow more btn | boolean | true |
| handleMore | more btn click callback | v=>void | - |
| moreText | more btn text | text | - |
| dataSource | Notification data source | array[IData] | - |
| className | wrap class | string | - |
| renderer | data source renderer | v:object=>void | - |
| width | wrap width | number | - |
## IData Props
| Property | Description | Type | Default |
:---|:---|:---|:---|
| avatar | Notification item avatar link | string | - |
| name |  Notification item name | string | - |
| time |  Notification item time | string|number | - |
| msg |  Notification item msg | string | - |
| hasNews |  this item ishasNews  | boolean | - |
### useage
<Playground>
    <Notification title="Notifications" hasmore handleMore={()=>console.log(1)} 
    dataSource={[
        { name: 'webb', time: '7:10 PM', msg: 'Jacky Travesura paid you $1,234.00', hasNews: true },
        { name: 'jason', time: '7:20 PM', msg: 'Jawebbcky Travesura paid you $1,234.00' },
    ]} 
    />
</Playground>