Chuyển đến nội dung chính

Green Native


Green Native
This is a React Native developer support library. 
In the process of working with React Native, I realized that it saves a lot of time using a support library. I also use some other public support libraries, but I feel dissatisfied or it is not suitable for me. 
I hope this library of mine will help you programmers!!

Install
npm i green-native react-native-vector-icons
Require
npx react-native-link

Colors
import { Colors } from "green-native";
<Text style={{ color: Colors.green, fontSize: 18 }}>Green Native</Text>;
Light and dark colors
<Text style={{ color: Colors.orangeDark, fontSize: 18 }}>Green Native</Text>
Social colors
<Text style={{ color: Colors.youtube, fontSize: 18 }}>Green Native</Text>
Button
import { Colors, Button } from "green-native";
<Button
  isOutLine={true}
  background={Colors.orange}
  boder={1}
  boderColor={Colors.green}
  radius={4}
  onPress={() => {
    console.log("green-native");
  }}
/>;
Avalailable props
NameTypeDefault
textstring: text center buttonnone
widthnumbernone
heightnumbernone
backgroundcolor#28C953
textColorcolor#fff
textBoldbooleanfalse
fontSizenumber14
radiusnumber0
bodernumber0
boderColorcolor#28C953
isOutLinebooleanfalse
isDarkbooleanfalse
isLightbooleanfalse
onPressfunctionconsole.log(Green Native)
Checkbox
import { Colors, CheckBox } from "green-native";
const GreenMaster = () => {
  const [status, setStatus] = React.useState(false);

  return (
    <View>
      <CheckBox
        checked={status}
        text="This this Green Native CheckBox"
        textColor={Colors.messenger}
        iconColor={Colors.green}
        iconCheckedColor={Colors.orange}
        onPress={() => {
          setStatus(!status);
        }}
      />
    </View>
  );
};
Avalailable props
NameTypeDefault
textstring: text right of iconnone
checkedbooleanfalse
iconTypestring: AntDesign, FontAwesome...MaterialCommunityIcons
iconNamestring: camera, rocket...checkbox-blank-outline
iconCheckedNamestring: camera, rocket...checkbox-marked
iconColorcolor#607D8B
iconCheckedColorcolor#28C953
iconSizenumber30
textSizenumber16
textColornumber#28C953
onPressfunctionconsole.log(Green Native)
activeOpacitynumber0.5
Spinner
import { Colors, Spinner } from "green-native";
<Spinner
  type="full"
  size="small"
  transparent={true}
  color={Colors.orangeDark}
/>;
Avalailable props
typestring: full, fullscreen -> full screen100%
transparentbooleanfalse -> backgroundColor: '#fff'
widthnumberfullscreen
heightnumberfullscreen
colorcolor#28C953
sizestring: large, smalllarge

Updating..

Keyword: green-native green native Green Native baochau baochau9xx



















Nhận xét