@ledgerhq/native-ui 0.15.0-nightly.1 → 0.15.0
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,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TouchableOpacityProps } from "react-native";
|
|
3
|
+
export type CardProps = TouchableOpacityProps & {
|
|
4
|
+
tag?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
imageUrl?: string;
|
|
7
|
+
onClickCard?: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare const InformativeCard: (props: CardProps) => React.ReactElement;
|
|
10
|
+
export default InformativeCard;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TouchableOpacity, Image } from "react-native";
|
|
3
|
+
import styled from "styled-components/native";
|
|
4
|
+
import Text from "../../Text";
|
|
5
|
+
import Flex from "../../Layout/Flex";
|
|
6
|
+
const Base = styled(TouchableOpacity) ``;
|
|
7
|
+
const ImageContent = styled(Image) `
|
|
8
|
+
border-radius: 8px;
|
|
9
|
+
`;
|
|
10
|
+
const CardContainer = (props) => {
|
|
11
|
+
const { imageUrl, title, tag } = props;
|
|
12
|
+
return (React.createElement(Flex, { flexDirection: "row" },
|
|
13
|
+
React.createElement(Flex, { justifyContent: "space-between", alignItems: "flex-start", py: 2, pr: 4, flex: 1 },
|
|
14
|
+
React.createElement(Text, { variant: "body", fontWeight: "medium", color: "neutral.c100", numberOfLines: 2 }, title),
|
|
15
|
+
React.createElement(Text, { variant: "paragraph", fontWeight: "medium", color: "neutral.c70", numberOfLines: 1, mt: 4 }, tag)),
|
|
16
|
+
React.createElement(Flex, { width: 100, height: 75 },
|
|
17
|
+
React.createElement(ImageContent, { source: {
|
|
18
|
+
uri: imageUrl,
|
|
19
|
+
}, style: { width: "100%", height: "100%" } }))));
|
|
20
|
+
};
|
|
21
|
+
const InformativeCard = (props) => {
|
|
22
|
+
return (React.createElement(Base, Object.assign({}, props, { activeOpacity: 0.5, onPress: props.onClickCard }),
|
|
23
|
+
React.createElement(CardContainer, Object.assign({}, props))));
|
|
24
|
+
};
|
|
25
|
+
export default InformativeCard;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/native-ui",
|
|
3
|
-
"version": "0.15.0
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Ledger Live - Mobile UI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"styled-system": "^5.1.5",
|
|
44
44
|
"victory-native": "^35.5.5",
|
|
45
45
|
"@ledgerhq/crypto-icons-ui": "^0.2.1",
|
|
46
|
-
"@ledgerhq/icons-ui": "^0.3.4
|
|
46
|
+
"@ledgerhq/icons-ui": "^0.3.4",
|
|
47
47
|
"@ledgerhq/ui-shared": "^0.1.10"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|