Toast.js 839 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import variable from "./../variables/platform";
  2. export default (variables = variable) => {
  3. const platform = variables.platform;
  4. const toastTheme = {
  5. ".danger": {
  6. backgroundColor: variables.brandDanger
  7. },
  8. ".warning": {
  9. backgroundColor: variables.brandWarning
  10. },
  11. ".success": {
  12. backgroundColor: variables.brandSuccess
  13. },
  14. backgroundColor: "rgba(0,0,0,0.8)",
  15. borderRadius: platform === "ios" ? 5 : 0,
  16. flexDirection: "row",
  17. justifyContent: "space-between",
  18. alignItems: "center",
  19. padding: 10,
  20. minHeight: 50,
  21. "NativeBase.Text": {
  22. color: "#fff",
  23. flex: 1
  24. },
  25. "NativeBase.Button": {
  26. backgroundColor: "transparent",
  27. height: 30,
  28. elevation: 0,
  29. "NativeBase.Text": {
  30. fontSize: 14
  31. }
  32. }
  33. };
  34. return toastTheme;
  35. };