create-native-di
Version:
cli สำหรับ react native ที่มีตัวอย่างโครงสร้างพื้นฐานพร้อมใช้งานประกอบไปด้วย package หลักๆ เช่น mobx,moment,lodash และรองรับภาษา javascript es6 และมี di สำหรับสลับ Store ที่จะติดต่อ api กับ fake mockup ที่สร้างขึ้นเอง ^^
39 lines (35 loc) • 877 B
JavaScript
import variable from "./../variables/platform";
export default (variables = variable) => {
const platform = variables.platform;
const toastTheme = {
".danger": {
backgroundColor: variables.brandDanger
},
".warning": {
backgroundColor: variables.brandWarning
},
".success": {
backgroundColor: variables.brandSuccess
},
backgroundColor: "rgba(0,0,0,0.8)",
borderRadius: platform === "ios" ? 5 : 0,
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
padding: 10,
minHeight: 50,
"NativeBase.Text": {
color: "#fff",
flex: 1
},
"NativeBase.Button": {
backgroundColor: "transparent",
height: 30,
elevation: 0,
"NativeBase.Text": {
fontSize: 14
}
}
};
return toastTheme;
};