@ledgerhq/native-ui 0.9.0-nightly.1 → 0.9.0-nightly.2
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/lib/components/Layout/Divider/index.d.ts +14 -0
- package/lib/components/Layout/Divider/index.js +8 -0
- package/lib/components/Layout/index.d.ts +1 -0
- package/lib/components/Layout/index.js +1 -0
- package/lib/components/tags/Tag/index.d.ts +6 -3
- package/lib/components/tags/Tag/index.js +11 -3
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="styled-components-react-native" />
|
|
2
|
+
declare const Divider: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").OverflowProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").BorderProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>> & import("styled-system").BackgroundProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Background<import("styled-system").TLengthStyledSystem>> & {
|
|
3
|
+
columnGap?: string | number | undefined;
|
|
4
|
+
rowGap?: string | number | undefined;
|
|
5
|
+
color?: string | undefined;
|
|
6
|
+
display?: string | undefined;
|
|
7
|
+
position?: string | undefined;
|
|
8
|
+
maxHeight?: number | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
my: number;
|
|
11
|
+
height: number;
|
|
12
|
+
backgroundColor: string;
|
|
13
|
+
}, "height" | "backgroundColor" | "my">;
|
|
14
|
+
export default Divider;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as Accordion } from "./Collapse/Accordion";
|
|
2
2
|
export { default as Flex } from "./Flex";
|
|
3
3
|
export { default as Box } from "./Box";
|
|
4
|
+
export { default as Divider } from "./Divider";
|
|
4
5
|
export * from "./Modals";
|
|
5
6
|
export { default as ScrollContainer } from "./ScrollContainer";
|
|
6
7
|
export { default as ScrollContainerHeader } from "./ScrollContainerHeader";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as Accordion } from "./Collapse/Accordion";
|
|
2
2
|
export { default as Flex } from "./Flex";
|
|
3
3
|
export { default as Box } from "./Box";
|
|
4
|
+
export { default as Divider } from "./Divider";
|
|
4
5
|
export * from "./Modals";
|
|
5
6
|
export { default as ScrollContainer } from "./ScrollContainer";
|
|
6
7
|
export { default as ScrollContainerHeader } from "./ScrollContainerHeader";
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FlexBoxProps } from "../../Layout/Flex";
|
|
3
|
+
import { IconType } from "../../Icon/type";
|
|
3
4
|
export interface TagProps extends FlexBoxProps {
|
|
4
|
-
|
|
5
|
+
type?: "shade" | "color" | "warning";
|
|
6
|
+
size?: "small" | "medium";
|
|
7
|
+
Icon?: IconType;
|
|
5
8
|
uppercase?: boolean;
|
|
6
|
-
children
|
|
9
|
+
children?: React.ReactNode;
|
|
7
10
|
}
|
|
8
|
-
export default function Tag({
|
|
11
|
+
export default function Tag({ type, size, uppercase, Icon, children, ...props }: TagProps): JSX.Element;
|
|
@@ -12,8 +12,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import React from "react";
|
|
13
13
|
import Flex from "../../Layout/Flex";
|
|
14
14
|
import Text from "../../Text";
|
|
15
|
+
import { Box } from "../../Layout";
|
|
16
|
+
const typeColor = {
|
|
17
|
+
color: "primary.c80",
|
|
18
|
+
shade: "neutral.c30",
|
|
19
|
+
warning: "warning.c100",
|
|
20
|
+
};
|
|
15
21
|
export default function Tag(_a) {
|
|
16
|
-
var {
|
|
17
|
-
return (React.createElement(Flex, Object.assign({ px:
|
|
18
|
-
React.createElement(
|
|
22
|
+
var { type = "shade", size = "small", uppercase, Icon, children } = _a, props = __rest(_a, ["type", "size", "uppercase", "Icon", "children"]);
|
|
23
|
+
return (React.createElement(Flex, Object.assign({ px: size === "small" ? "6px" : 3, alignItems: "center", justifyContent: "center", flexDirection: "row", borderRadius: 6, bg: typeColor[type], height: size === "small" ? "18px" : "28px" }, props),
|
|
24
|
+
Icon && (React.createElement(Box, { pr: 2 },
|
|
25
|
+
React.createElement(Icon, { size: size === "small" ? 16 : 20, color: type === "shade" ? "neutral.c90" : "neutral.c00" }))),
|
|
26
|
+
React.createElement(Text, { variant: size === "small" ? "subtitle" : "small", fontWeight: "bold", uppercase: uppercase !== false, textAlign: "center", color: type === "shade" ? "neutral.c90" : "neutral.c00" }, children)));
|
|
19
27
|
}
|