Segment.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // @flow
  2. import variable from "./../variables/platform";
  3. export default (variables /*: * */ = variable) => {
  4. const platform = variables.platform;
  5. const segmentTheme = {
  6. height: 45,
  7. borderColor: variables.segmentBorderColorMain,
  8. flexDirection: "row",
  9. justifyContent: "center",
  10. backgroundColor: variables.segmentBackgroundColor,
  11. "NativeBase.Button": {
  12. alignSelf: "center",
  13. borderRadius: 0,
  14. paddingTop: 3,
  15. paddingBottom: 3,
  16. height: 30,
  17. backgroundColor: "transparent",
  18. borderWidth: 1,
  19. borderLeftWidth: 0,
  20. borderColor: variables.segmentBorderColor,
  21. elevation: 0,
  22. ".active": {
  23. backgroundColor: variables.segmentActiveBackgroundColor,
  24. "NativeBase.Text": {
  25. color: variables.segmentActiveTextColor
  26. },
  27. "NativeBase.Icon": {
  28. color: variables.segmentActiveTextColor
  29. }
  30. },
  31. ".first": {
  32. borderTopLeftRadius: platform === "ios" ? 5 : undefined,
  33. borderBottomLeftRadius: platform === "ios" ? 5 : undefined,
  34. borderLeftWidth: 1
  35. },
  36. ".last": {
  37. borderTopRightRadius: platform === "ios" ? 5 : undefined,
  38. borderBottomRightRadius: platform === "ios" ? 5 : undefined
  39. },
  40. "NativeBase.Text": {
  41. color: variables.segmentTextColor,
  42. fontSize: 14
  43. },
  44. "NativeBase.Icon": {
  45. fontSize: 22,
  46. paddingTop: 0,
  47. color: variables.segmentTextColor
  48. }
  49. }
  50. };
  51. return segmentTheme;
  52. };