stylesheet.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import {
  2. type ViewStyle,
  3. StyleSheet,
  4. Platform
  5. } from "react-native";
  6. import type {
  7. MenuDynamicStyle
  8. } from "./type";
  9. import type {
  10. Mutable
  11. } from "../../types";
  12. const stylesheet = StyleSheet.create({
  13. container: {
  14. flexDirection: "column",
  15. ...Platform.select({
  16. web: {
  17. minWidth: 280,
  18. maxWidth: 340,
  19. width: "auto"
  20. },
  21. default: {
  22. width: "82%"
  23. }
  24. }),
  25. position: "absolute",
  26. display: "flex",
  27. height: "100%",
  28. zIndex: 99997,
  29. bottom: 0,
  30. left: 0,
  31. top: 0
  32. },
  33. content: {
  34. justifyContent: "flex-start",
  35. flexDirection: "column",
  36. alignItems: "stretch",
  37. flex: 1
  38. },
  39. safeAreaView: {
  40. flex: 1
  41. },
  42. headerContainer: {
  43. justifyContent: "center",
  44. alignItems: "flex-start",
  45. width: "100%"
  46. },
  47. seperator: {
  48. }
  49. });
  50. export const useStyles = ({
  51. colors,
  52. spaces
  53. }: MenuDynamicStyle) => {
  54. const styles = {
  55. container: {
  56. backgroundColor: colors.content.container.default
  57. } as Mutable<ViewStyle>,
  58. headerContainer: {
  59. paddingHorizontal: spaces.spacingMd,
  60. paddingTop: spaces.spacingMd
  61. } as Mutable<ViewStyle>,
  62. seperator: {
  63. marginVertical: spaces.spacingMd
  64. } as Mutable<ViewStyle>
  65. };
  66. return styles;
  67. };
  68. export default stylesheet;