1.0.0 • Published 7 years ago

rn-dashline v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

DashLine

React Native虚线组件(兼容Android)

为什么要有这个组件

目前,在Android上给某一边设置虚线,显示是不正常的。所以开发这个组件,去实现一条虚线。

注意: 目前只实现水平方向的虚线,如果有需要实现垂直方向的虚线,欢迎PR。

安装

npm install rn-dashline --save

使用

import DashLine from 'rn-dashline';

export default ({}) => {
  return (
    <View style={{flexDirection: 'row'}}>
      {/* other components */}
      <DashLine style={{flex: 1, margin: 5}} lineWidth={2} />
    </View>
  )
}

属性

名称类型描述
colorString线条颜色,默认:'black'
backgroundColorString背景颜色,默认:'white'
lineWidthNumber线条粗细,默认:1
styleObject组件样式

License

MIT License