前言:无意中在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 />
还有一些其它的东西,小伙伴们自己去看哈!!~~
最好感谢这位大牛的无私奉献~
介绍了一个名为react-native-material-kit的开源库,此库提供了一系列Android Material Design风格的UI组件,适用于React Native应用程序。通过简单的配置即可实现美观且功能丰富的按钮等元素。
1478

被折叠的 条评论
为什么被折叠?



