nsky-navigate
v0.2.11
Published
Nsky Component
Downloads
11
Maintainers
Readme
nsky-navigate
Nsky Common Component
Screenshots
install
dnpm install nsky-navigate --save-dev
Usage
import NskyNavigate from 'nsky-navigate'
import React from 'react'
import ReactDOM from 'react-dom'
import 'nsky-navigate/dist/index.css'
ReactDOM.render(<NskyNavigate />, container)
API
props
name | type | default | description | -----|------|---------|--------------| navigates | Array | [] | 导航的配置内容,包含链接地址、文字、icon | className | String | | 最外层的class类名 |
navigates配置示例
[{
text: '指标',
link: '#/distribution',
isActive: true,
icon: 'distribution',
callback: function() {
console.log('after click the link)
}
},{
text: 'geofence',
link: 'javascript:void(0);',
icon: 'geofence',
callback: function() {
console.log('after click the link)
}
}]
Development
npm install
npm run example