stylesheet.ts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. import {
  2. type ViewStyle,
  3. StyleSheet
  4. } from "react-native";
  5. import {
  6. type DateTimeSheetDynamicStyleType
  7. } from "./type";
  8. import type {
  9. Mutable
  10. } from "../../types";
  11. const stylesheet = StyleSheet.create({
  12. contentContainer: {
  13. flexDirection: "column"
  14. },
  15. headerContainer: {
  16. flexDirection: "column",
  17. width: "100%"
  18. },
  19. bottomContainer: {
  20. flexDirection: "row",
  21. alignItems: "center"
  22. },
  23. loadingContainer: {
  24. justifyContent: "center",
  25. alignItems: "center",
  26. flex: 1
  27. },
  28. itemContentContainer: {
  29. flex: 1
  30. },
  31. toolsContainer: {
  32. justifyContent: "space-between",
  33. flexDirection: "row",
  34. alignItems: "center"
  35. },
  36. moreLoadingContainer: {
  37. justifyContent: "center",
  38. alignItems: "center",
  39. width: "100%"
  40. },
  41. calendarChangerToolContainer: {
  42. alignSelf: "baseline",
  43. flexDirection: "row"
  44. },
  45. calendarChangerToolButton: {
  46. }
  47. });
  48. export const useStyles = ({
  49. radiuses,
  50. borders,
  51. spaces,
  52. colors
  53. }: DateTimeSheetDynamicStyleType) => {
  54. const styles = {
  55. contentContainer: {
  56. paddingVertical: spaces.spacingSm
  57. } as Mutable<ViewStyle>,
  58. headerContainer: {
  59. marginBottom: spaces.spacingSm
  60. } as Mutable<ViewStyle>,
  61. headerTitle: {
  62. } as Mutable<ViewStyle>,
  63. bottomContainer: {
  64. marginTop: spaces.spacingSm,
  65. padding: spaces.spacingSm
  66. } as Mutable<ViewStyle>,
  67. cancelButton: {
  68. marginRight: spaces.spacingSm
  69. } as Mutable<ViewStyle>,
  70. okButton: {
  71. marginLeft: spaces.spacingSm
  72. } as Mutable<ViewStyle>,
  73. loadingContainer: {
  74. padding: spaces.spacingMd
  75. } as Mutable<ViewStyle>,
  76. toolsContainer: {
  77. marginTop: spaces.spacingSm
  78. } as Mutable<ViewStyle>,
  79. moreLoadingContainer: {
  80. padding: spaces.spacingSm
  81. } as Mutable<ViewStyle>,
  82. calendarChangerToolContainer: {
  83. borderColor: colors.content.border.subtle,
  84. marginBottom: spaces.spacingSm,
  85. borderRadius: radiuses.actions,
  86. borderWidth: borders.line
  87. } as Mutable<ViewStyle>,
  88. calendarChangerToolButton: {
  89. paddingHorizontal: spaces.spacingSm,
  90. paddingVertical: spaces.spacingSm,
  91. borderRadius: radiuses.actions
  92. } as Mutable<ViewStyle>
  93. };
  94. return styles;
  95. };
  96. export default stylesheet;