@hoddy-ui/core 1.0.96 → 1.0.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hoddy-ui/core",
3
- "version": "1.0.96",
3
+ "version": "1.0.97",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -11,7 +11,7 @@ import {
11
11
 
12
12
  import React, { useState } from "react";
13
13
  import { ScaledSheet } from "react-native-size-matters";
14
- import { useColors } from "../hooks";
14
+ import { useColors, useTheme } from "../hooks";
15
15
  import { PopupProps } from "../types";
16
16
  import { IconButton } from "./Button";
17
17
  import Typography from "./Typography";
@@ -25,7 +25,9 @@ export const Popup: React.FC<PopupProps> = ({
25
25
  children,
26
26
  open,
27
27
  onClose = () => {},
28
+ style,
28
29
  }) => {
30
+ const theme = useTheme();
29
31
  const colors = useColors();
30
32
  const [show, setShow] = useState(open);
31
33
  const [showSecondary, setShowSecondary] = useState(false);
@@ -47,12 +49,13 @@ export const Popup: React.FC<PopupProps> = ({
47
49
  },
48
50
  container: {
49
51
  paddingBottom: sheet ? "30@ms" : 0,
50
- backgroundColor: colors.white[2],
52
+ backgroundColor: theme === "dark" ? "#111" : colors.white[2],
51
53
  borderTopLeftRadius: 20,
52
54
  borderTopRightRadius: 20,
53
55
  borderBottomRightRadius: sheet ? 0 : 20,
54
56
  borderBottomLeftRadius: sheet ? 0 : 20,
55
57
  width: "100%",
58
+ ...style,
56
59
  },
57
60
  content: {
58
61
  paddingHorizontal: bare ? undefined : "10@ms",
package/src/types.ts CHANGED
@@ -220,6 +220,7 @@ export interface PopupProps {
220
220
  children: ReactNode;
221
221
  open: boolean;
222
222
  onClose?: () => void;
223
+ style?: ViewStyle;
223
224
  }
224
225
 
225
226
  export interface SpinnerProps {