Toast.js 921 B

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