前言:無意中在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
新聞熱點
疑難解答