SpecBtns.tsx 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. import Buttons from "@/components/basic/Buttons"
  2. import { ButtonType } from "@/utils/types"
  3. import { View, Text } from "@tarojs/components"
  4. export const StartFastBtn = (props: { onClick: Function }) => {
  5. return (
  6. <Buttons title="开始断食" type={ButtonType.elevated}
  7. onClick={() => { props.onClick() }}
  8. btnStyle={{
  9. height: 50,
  10. borderRadius: 25,
  11. backgroundColor: '#AAFF00',
  12. paddingLeft: 40,
  13. paddingRight: 40,
  14. color: 'black',
  15. fontSize: 20,
  16. display: 'flex',
  17. alignItems: 'center',
  18. justifyContent: 'center',
  19. // lineHeight:20
  20. }}
  21. />
  22. )
  23. }
  24. export const StartSleepBtn = (props: { onClick: Function, lowLight?: boolean }) => {
  25. return (
  26. <Buttons title="开始睡眠" type={ButtonType.elevated}
  27. onClick={() => { props.onClick() }}
  28. lowLight={props.lowLight ? props.lowLight : false}
  29. btnStyle={{
  30. height: 50,
  31. borderRadius: 25,
  32. backgroundColor: '#00FFFF',
  33. paddingLeft: 40,
  34. paddingRight: 40,
  35. color: 'black',
  36. fontSize: 20,
  37. display: 'flex',
  38. alignItems: 'center',
  39. justifyContent: 'center',
  40. // lineHeight:20
  41. }}
  42. />
  43. )
  44. }
  45. export const EndSleepBtn = (props: { onClick: Function, lowLight?: boolean }) => {
  46. return (
  47. <Buttons title="结束睡眠" type={ButtonType.outline}
  48. onClick={() => { props.onClick() }}
  49. lowLight={props.lowLight ? props.lowLight : false}
  50. btnStyle={{
  51. height: 50,
  52. borderRadius: 25,
  53. borderColor: '#00FFFF',
  54. borderWidth: 1,
  55. borderStyle: 'solid',
  56. paddingLeft: 40,
  57. paddingRight: 40,
  58. color: '#00FFFF',
  59. fontSize: 20,
  60. display: 'flex',
  61. alignItems: 'center',
  62. justifyContent: 'center',
  63. // lineHeight:20
  64. }}
  65. />
  66. )
  67. }
  68. export const EndFastBtn = (props: { onClick: Function, lowLight?: boolean }) => {
  69. return (
  70. <Buttons title="结束断食" type={ButtonType.outline}
  71. onClick={() => { props.onClick() }}
  72. lowLight={props.lowLight ? props.lowLight : false}
  73. btnStyle={{
  74. height: 50,
  75. borderRadius: 25,
  76. borderColor: '#AAFF00',
  77. borderWidth: 1,
  78. borderStyle: 'solid',
  79. paddingLeft: 40,
  80. paddingRight: 40,
  81. color: '#AAFF00',
  82. fontSize: 20,
  83. display: 'flex',
  84. alignItems: 'center',
  85. justifyContent: 'center',
  86. // lineHeight:20
  87. }}
  88. />
  89. )
  90. }
  91. export const SetScheduleBtn = (props: { onClick: Function, title: string,isFast?:boolean, lowLight?: boolean }) => {
  92. return (
  93. <Buttons title={props.title} type={ButtonType.elevated}
  94. onClick={() => { props.onClick() }}
  95. lowLight={props.lowLight ? props.lowLight : false}
  96. btnStyle={{
  97. height: 50,
  98. width:300,
  99. boxSizing:'border-box',
  100. borderRadius: 25,
  101. backgroundColor: props.isFast?'#AAFF00':'#00FFFF',
  102. paddingLeft: 40,
  103. paddingRight: 40,
  104. color: 'black',
  105. fontSize: 20,
  106. display: 'flex',
  107. alignItems: 'center',
  108. justifyContent: 'center',
  109. }}
  110. />
  111. )
  112. }