前言:无意中在github上面看到了一个很6的开源库react-native-material-kit,看名字就知道是一个android程序员写出来的哈~~start跟fork的人很多额,于是仔细看了一下内容,哇哦,此大牛不得了哈(看代码注释都是英文,我一开始还以为是外国的大牛,结果点进去发现是国牛啊),果断follow啊!
先附上项目库的github链接:https://github.com/xinthink/react-native-material-kit
库中有android material风格的大部分内容:
Button:
使用方法也是灰常简单:
const CustomButton = new MKButton.Builder() .withBackgroundColor(MKColor.Teal) .withShadowRadius(2) .withShadowOffset({width:0, height:2}) .withShadowOpacity(.7) .withShadowColor('black') .withOnPRess(() => { console.log('hi, raised button!'); }) .withTextStyle({ color: 'white', fontWeight: 'bold', }) .withText('RAISED BUTTON') .build();...<CustomButton />还有一些其它的东西,小伙伴们自己去看哈!!~~ 最好感谢这位大牛的无私奉献~
https://github.com/xinthink/react-native-material-kit
新闻热点
疑难解答