ferns-ui 1.2.2 → 1.2.4

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.
@@ -0,0 +1,41 @@
1
+ import React, {FC, useState} from "react";
2
+ import {Pressable} from "react-native";
3
+
4
+ import {InfoModalIconProps} from "./Common";
5
+ import {Heading} from "./Heading";
6
+ import {Modal} from "./Modal";
7
+
8
+ export const InfoModalIcon: FC<InfoModalIconProps> = ({
9
+ infoModalChildren,
10
+ infoModalSubtitle,
11
+ infoModalText,
12
+ infoModalTitle,
13
+ }) => {
14
+ const [infoModalVisibleState, setInfoModalVisibleState] = useState(false);
15
+ return (
16
+ <>
17
+ <Modal
18
+ primaryButtonOnClick={() => setInfoModalVisibleState(false)}
19
+ primaryButtonText="Close"
20
+ size="md"
21
+ subtitle={infoModalSubtitle}
22
+ text={infoModalText}
23
+ title={infoModalTitle}
24
+ visible={infoModalVisibleState}
25
+ onDismiss={() => setInfoModalVisibleState(false)}
26
+ >
27
+ {infoModalChildren}
28
+ </Modal>
29
+ <Pressable
30
+ aria-role="button"
31
+ hitSlop={{top: 10, bottom: 10, left: 10, right: 10}}
32
+ style={{marginLeft: 8}}
33
+ onPress={() => setInfoModalVisibleState(true)}
34
+ >
35
+ <Heading color="secondaryLight" size="sm">
36
+
37
+ </Heading>
38
+ </Pressable>
39
+ </>
40
+ );
41
+ };
package/src/Modal.tsx CHANGED
@@ -128,7 +128,7 @@ const ModalContent: FC<{
128
128
  </View>
129
129
  )}
130
130
  {children && (
131
- <View aria-role="text" style={{marginTop: text ? 0 : 12}}>
131
+ <View aria-role="text" style={{marginTop: text ? 0 : 12, width: "100%"}}>
132
132
  {children}
133
133
  </View>
134
134
  )}
package/src/index.tsx CHANGED
@@ -13,6 +13,7 @@ export * from "./CheckBox";
13
13
  export * from "./Common";
14
14
  export * from "./Constants";
15
15
  export * from "./CustomSelectField";
16
+ export * from "./DataTable";
16
17
  export * from "./DateTimeActionSheet";
17
18
  export * from "./DateTimeField";
18
19
  export * from "./DateUtilities";
@@ -30,6 +31,7 @@ export * from "./Icon";
30
31
  export * from "./IconButton";
31
32
  export * from "./Image";
32
33
  export * from "./ImageBackground";
34
+ export * from "./InfoModalIcon";
33
35
  export * from "./InfoTooltipButton";
34
36
  export * from "./Link";
35
37
  export * from "./MediaQuery";