@ledgerhq/react-ui 0.8.0-nightly.0 → 0.8.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.
|
@@ -63,7 +63,7 @@ const StyledIconContainer = import_styled_components.default.div`
|
|
|
63
63
|
}}
|
|
64
64
|
|
|
65
65
|
border-radius: ${(p) => `${p.theme.radii[1]}px`};
|
|
66
|
-
margin-right ${(p) => `${p.theme.space[6]}px`};
|
|
66
|
+
margin-right: ${(p) => `${p.theme.space[6]}px`};
|
|
67
67
|
padding: 6px;
|
|
68
68
|
display: flex;
|
|
69
69
|
align-items: center;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/components/message/Tip/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from \"react\";\nimport styled, { css } from \"styled-components\";\nimport Text from \"../../asorted/Text\";\nimport { CheckAloneMedium, CloseMedium, CircledAlertMedium } from \"@ledgerhq/icons-ui/react\";\nimport { Flex } from \"../../layout\";\n\ntype TipType = \"success\" | \"warning\" | \"error\";\n\nexport interface TipProps {\n type?: TipType;\n label: string;\n}\n\nconst icons = {\n success: <CheckAloneMedium size={16} />,\n warning: <CircledAlertMedium size={16} />,\n error: <CloseMedium size={16} />,\n};\n\nconst StyledIconContainer = styled.div<{ type?: TipType }>`\n ${(p) => {\n switch (p.type) {\n case \"warning\":\n return css`\n background: ${p.theme.colors.warning.c10};\n color: ${p.theme.colors.warning.c100};\n `;\n case \"error\":\n return css`\n background: ${p.theme.colors.error.c10};\n color: ${p.theme.colors.error.c100};\n `;\n case \"success\":\n default:\n return css`\n background: ${p.theme.colors.success.c30};\n color: ${p.theme.colors.success.c100};\n `;\n }\n }}\n\n border-radius: ${(p) => `${p.theme.radii[1]}px`};\n margin-right ${(p) => `${p.theme.space[6]}px`};\n padding: 6px;\n display: flex;\n align-items: center;\n`;\n\nexport default function Tip({ type, label }: TipProps): JSX.Element {\n return (\n <Flex alignItems={\"center\"}>\n {type && <StyledIconContainer type={type}>{icons[type]}</StyledIconContainer>}\n <Text variant={\"paragraph\"} fontWeight={\"medium\"} color={\"neutral.c100\"} flexShrink={1}>\n {label}\n </Text>\n </Flex>\n );\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,+BAA4B;AAC5B,kBAAiB;AACjB,oBAAkE;AAClE,oBAAqB;AASrB,MAAM,QAAQ;AAAA,EACZ,SAAS,mDAAC,gCAAD;AAAA,IAAkB,MAAM;AAAA;AAAA,EACjC,SAAS,mDAAC,kCAAD;AAAA,IAAoB,MAAM;AAAA;AAAA,EACnC,OAAO,mDAAC,2BAAD;AAAA,IAAa,MAAM;AAAA;AAAA;AAG5B,MAAM,sBAAsB,iCAAO;AAAA,IAC/B,CAAC,MAAM;AACP,UAAQ,EAAE;AAAA,SACH;AACH,aAAO;AAAA,wBACS,EAAE,MAAM,OAAO,QAAQ;AAAA,mBAC5B,EAAE,MAAM,OAAO,QAAQ;AAAA;AAAA,SAE/B;AACH,aAAO;AAAA,wBACS,EAAE,MAAM,OAAO,MAAM;AAAA,mBAC1B,EAAE,MAAM,OAAO,MAAM;AAAA;AAAA,SAE7B;AAAA;AAEH,aAAO;AAAA,wBACS,EAAE,MAAM,OAAO,QAAQ;AAAA,mBAC5B,EAAE,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,mBAKvB,CAAC,MAAM,GAAG,EAAE,MAAM,MAAM;AAAA,
|
|
4
|
+
"sourcesContent": ["import React from \"react\";\nimport styled, { css } from \"styled-components\";\nimport Text from \"../../asorted/Text\";\nimport { CheckAloneMedium, CloseMedium, CircledAlertMedium } from \"@ledgerhq/icons-ui/react\";\nimport { Flex } from \"../../layout\";\n\ntype TipType = \"success\" | \"warning\" | \"error\";\n\nexport interface TipProps {\n type?: TipType;\n label: string;\n}\n\nconst icons = {\n success: <CheckAloneMedium size={16} />,\n warning: <CircledAlertMedium size={16} />,\n error: <CloseMedium size={16} />,\n};\n\nconst StyledIconContainer = styled.div<{ type?: TipType }>`\n ${(p) => {\n switch (p.type) {\n case \"warning\":\n return css`\n background: ${p.theme.colors.warning.c10};\n color: ${p.theme.colors.warning.c100};\n `;\n case \"error\":\n return css`\n background: ${p.theme.colors.error.c10};\n color: ${p.theme.colors.error.c100};\n `;\n case \"success\":\n default:\n return css`\n background: ${p.theme.colors.success.c30};\n color: ${p.theme.colors.success.c100};\n `;\n }\n }}\n\n border-radius: ${(p) => `${p.theme.radii[1]}px`};\n margin-right: ${(p) => `${p.theme.space[6]}px`};\n padding: 6px;\n display: flex;\n align-items: center;\n`;\n\nexport default function Tip({ type, label }: TipProps): JSX.Element {\n return (\n <Flex alignItems={\"center\"}>\n {type && <StyledIconContainer type={type}>{icons[type]}</StyledIconContainer>}\n <Text variant={\"paragraph\"} fontWeight={\"medium\"} color={\"neutral.c100\"} flexShrink={1}>\n {label}\n </Text>\n </Flex>\n );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,+BAA4B;AAC5B,kBAAiB;AACjB,oBAAkE;AAClE,oBAAqB;AASrB,MAAM,QAAQ;AAAA,EACZ,SAAS,mDAAC,gCAAD;AAAA,IAAkB,MAAM;AAAA;AAAA,EACjC,SAAS,mDAAC,kCAAD;AAAA,IAAoB,MAAM;AAAA;AAAA,EACnC,OAAO,mDAAC,2BAAD;AAAA,IAAa,MAAM;AAAA;AAAA;AAG5B,MAAM,sBAAsB,iCAAO;AAAA,IAC/B,CAAC,MAAM;AACP,UAAQ,EAAE;AAAA,SACH;AACH,aAAO;AAAA,wBACS,EAAE,MAAM,OAAO,QAAQ;AAAA,mBAC5B,EAAE,MAAM,OAAO,QAAQ;AAAA;AAAA,SAE/B;AACH,aAAO;AAAA,wBACS,EAAE,MAAM,OAAO,MAAM;AAAA,mBAC1B,EAAE,MAAM,OAAO,MAAM;AAAA;AAAA,SAE7B;AAAA;AAEH,aAAO;AAAA,wBACS,EAAE,MAAM,OAAO,QAAQ;AAAA,mBAC5B,EAAE,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,mBAKvB,CAAC,MAAM,GAAG,EAAE,MAAM,MAAM;AAAA,kBACzB,CAAC,MAAM,GAAG,EAAE,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAM3B,aAAa,EAAE,MAAM,SAAgC;AAClE,SACE,mDAAC,oBAAD;AAAA,IAAM,YAAY;AAAA,KACf,QAAQ,mDAAC,qBAAD;AAAA,IAAqB;AAAA,KAAa,MAAM,QACjD,mDAAC,qBAAD;AAAA,IAAM,SAAS;AAAA,IAAa,YAAY;AAAA,IAAU,OAAO;AAAA,IAAgB,YAAY;AAAA,KAClF;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -31,7 +31,7 @@ const StyledIconContainer = styled.div `
|
|
|
31
31
|
}}
|
|
32
32
|
|
|
33
33
|
border-radius: ${(p) => `${p.theme.radii[1]}px`};
|
|
34
|
-
margin-right ${(p) => `${p.theme.space[6]}px`};
|
|
34
|
+
margin-right: ${(p) => `${p.theme.space[6]}px`};
|
|
35
35
|
padding: 6px;
|
|
36
36
|
display: flex;
|
|
37
37
|
align-items: center;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/react-ui",
|
|
3
|
-
"version": "0.8.0
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Ledger Live - Desktop UI",
|
|
5
5
|
"author": "Ledger Live Team <team-live@ledger.fr>",
|
|
6
6
|
"repository": "https://github.com/LedgerHQ/ui",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@floating-ui/react-dom": "^0.4.0",
|
|
37
|
-
"@ledgerhq/icons-ui": "^0.2.
|
|
38
|
-
"@ledgerhq/ui-shared": "^0.1.
|
|
37
|
+
"@ledgerhq/icons-ui": "^0.2.6",
|
|
38
|
+
"@ledgerhq/ui-shared": "^0.1.9",
|
|
39
39
|
"@tippyjs/react": "^4.2.6",
|
|
40
40
|
"@types/color": "^3.0.2",
|
|
41
41
|
"@types/react": "~17.0.37",
|