rat-view

0.1.28 • Public • Published

rat-view

组件介绍

View 是最基础的组件,它支持Flexbox、touch handling等功能,并且可以任意嵌套。 不论在什么容器中,View 都直接对应一个容器的原生视图,就像 web 中的 div 一样。 支持任意自定义属性的透传。

demo

import View from 'rat-view';

render(<View style={{
      padding: 30,
    }}>
   <View style={{
      width: 300,
      height: 300,
      backgroundColor:"red"
    }}/>
   <View style={{
      width: 300,
      height: 300,
      backgroundColor:"green",
      position: 'absolute',
      top: 20,
      left: 20,
    }}/>
   <View style={{
      width: 300,
      height: 300,
      backgroundColor:"yellow",
      position: 'absolute',
      top: 80,
      left: 210,
    }}/>
</View>);

Readme

Keywords

Package Sidebar

Install

npm i rat-view

Weekly Downloads

0

Version

0.1.28

License

BSD-3-Clause

Unpacked Size

30.9 kB

Total Files

12

Last publish

Collaborators

  • 55555azhe
  • bondli