@ledgerhq/native-ui 0.20.1-nightly.1 → 0.20.1
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.
|
@@ -13,8 +13,9 @@ export interface BaseTextProps extends TextProps, BaseStyledProps, FontSizeProps
|
|
|
13
13
|
lineHeight?: string;
|
|
14
14
|
bracket?: boolean;
|
|
15
15
|
textTransform?: TextStyle["textTransform"];
|
|
16
|
+
testID?: string;
|
|
16
17
|
uppercase?: boolean;
|
|
17
18
|
children?: React.ReactNode;
|
|
18
19
|
}
|
|
19
|
-
declare const Text: ({ children, bracket, textAlign, ...props }: BaseTextProps) => JSX.Element;
|
|
20
|
+
declare const Text: ({ children, bracket, textAlign, testID, ...props }: BaseTextProps) => JSX.Element;
|
|
20
21
|
export default Text;
|
|
@@ -56,9 +56,9 @@ const BracketText = (_a) => {
|
|
|
56
56
|
React.createElement(BracketRight, { fill: c, width: size, height: size })));
|
|
57
57
|
};
|
|
58
58
|
const Text = (_a) => {
|
|
59
|
-
var { children, bracket, textAlign = "left" } = _a, props = __rest(_a, ["children", "bracket", "textAlign"]);
|
|
59
|
+
var { children, bracket, textAlign = "left", testID } = _a, props = __rest(_a, ["children", "bracket", "textAlign", "testID"]);
|
|
60
60
|
if (bracket)
|
|
61
61
|
return React.createElement(BracketText, Object.assign({}, props), children);
|
|
62
|
-
return (React.createElement(Base, Object.assign({ textAlign: textAlign }, props), children));
|
|
62
|
+
return (React.createElement(Base, Object.assign({ textAlign: textAlign }, props, { testID: testID }), children));
|
|
63
63
|
};
|
|
64
64
|
export default Text;
|
|
@@ -15,6 +15,7 @@ export type ButtonProps = TouchableOpacityProps & BaseStyledProps & {
|
|
|
15
15
|
children?: React.ReactNode;
|
|
16
16
|
pending?: boolean;
|
|
17
17
|
displayContentWhenPending?: boolean;
|
|
18
|
+
testID?: string;
|
|
18
19
|
};
|
|
19
20
|
export declare const Base: import("styled-components").StyledComponent<typeof TouchableOpacity, import("styled-components").DefaultTheme, {
|
|
20
21
|
iconButton?: boolean | undefined;
|
|
@@ -69,9 +69,9 @@ const ButtonContainer = (props) => {
|
|
|
69
69
|
iconPosition === "left" && children ? (React.createElement(Text, { variant: ctaTextType[size], fontWeight: "semiBold", color: textColor }, children)) : null));
|
|
70
70
|
};
|
|
71
71
|
const Button = (props) => {
|
|
72
|
-
const { Icon, children, type = "default", iconName, disabled = false, pending = false, displayContentWhenPending = false, } = props;
|
|
72
|
+
const { Icon, children, type = "default", iconName, disabled = false, pending = false, displayContentWhenPending = false, testID, } = props;
|
|
73
73
|
const theme = useTheme();
|
|
74
|
-
return (React.createElement(Base, Object.assign({}, props, { type: type, iconButton: (!!Icon || !!iconName) && !children, activeOpacity: 1, disabled: disabled || pending }),
|
|
74
|
+
return (React.createElement(Base, Object.assign({}, props, { type: type, iconButton: (!!Icon || !!iconName) && !children, activeOpacity: 1, disabled: disabled || pending, testID: testID }),
|
|
75
75
|
React.createElement(View, null,
|
|
76
76
|
React.createElement(ButtonContainer, Object.assign({}, props, { type: type, hide: pending && !displayContentWhenPending })),
|
|
77
77
|
pending && !displayContentWhenPending ? (React.createElement(SpinnerContainer, { displayContentWhenPending: displayContentWhenPending },
|
|
@@ -19,12 +19,12 @@ export interface AlertProps {
|
|
|
19
19
|
}
|
|
20
20
|
declare function Alert({ type, Icon, title, showIcon, children }: AlertProps): JSX.Element;
|
|
21
21
|
declare namespace Alert {
|
|
22
|
-
var BodyText: import("styled-components").StyledComponent<({ children, bracket, textAlign, ...props }: import("../../Text").BaseTextProps) => JSX.Element, import("styled-components").DefaultTheme, {
|
|
22
|
+
var BodyText: import("styled-components").StyledComponent<({ children, bracket, textAlign, testID, ...props }: import("../../Text").BaseTextProps) => JSX.Element, import("styled-components").DefaultTheme, {
|
|
23
23
|
flexShrink: 1;
|
|
24
24
|
variant: "bodyLineHeight";
|
|
25
25
|
fontWeight: "semiBold";
|
|
26
26
|
}, "fontWeight" | "flexShrink" | "variant">;
|
|
27
|
-
var UnderlinedText: import("styled-components").StyledComponent<({ children, bracket, textAlign, ...props }: import("../../Text").BaseTextProps) => JSX.Element, import("styled-components").DefaultTheme, {
|
|
27
|
+
var UnderlinedText: import("styled-components").StyledComponent<({ children, bracket, textAlign, testID, ...props }: import("../../Text").BaseTextProps) => JSX.Element, import("styled-components").DefaultTheme, {
|
|
28
28
|
flexShrink: 1;
|
|
29
29
|
variant: "bodyLineHeight";
|
|
30
30
|
fontWeight: "semiBold";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/native-ui",
|
|
3
|
-
"version": "0.20.1
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"description": "Ledger Live - Mobile UI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"styled-system": "^5.1.5",
|
|
48
48
|
"victory-native": "^35.5.5",
|
|
49
49
|
"@ledgerhq/crypto-icons-ui": "^0.3.0",
|
|
50
|
-
"@ledgerhq/icons-ui": "^0.4.1
|
|
50
|
+
"@ledgerhq/icons-ui": "^0.4.1",
|
|
51
51
|
"@ledgerhq/ui-shared": "^0.2.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|