npm.io
0.1.0 • Published 7 years ago

tf-react-sidebar

Licence
ISC
Version
0.1.0
Deps
0
Size
42 kB
Vulns
0
Weekly
0

sidebar组件

本组件基于npm构建, react版本

安装

npm i tf-react-sidebar
引入
import Sidebar from 'tf-react-sidebar'
import 'tf-react-sidebar/dist/index.css'
使用
<Sidebar
  placement= 'bottom' // top, bottom, left, right 4个方向, 内容从哪个方向滑出
  isClickMaskClose={true} // 点击遮罩是否隐藏(关闭)
  hasMask={true} // 是否有遮罩
  onVisibleChange={ (tag) => {} } // 可见性调用
  overlayClassName='' // 设置类名
  overlayStyle={{color: 'red'}} // 样式
  content='' // 内容, 可以是字符串或者一个react组件
  visible={false}
>
<div>点我触发......</div>
</Sidebar>
更新日志
0.1.0
  版本发布