@artsy/palette-mobile 16.0.0 → 17.1.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.
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IconProps } from "./Icon";
|
|
3
3
|
type Direction = "left" | "right" | "up" | "down";
|
|
4
|
+
export declare const ChevronRightIcon: ({ fill, ...restProps }: IconProps) => JSX.Element;
|
|
5
|
+
export declare const ChevronUpIcon: ({ fill, ...restProps }: IconProps) => JSX.Element;
|
|
6
|
+
export declare const ChevronLeftIcon: ({ fill, ...restProps }: IconProps) => JSX.Element;
|
|
7
|
+
export declare const ChevronDownIcon: ({ fill, ...restProps }: IconProps) => JSX.Element;
|
|
4
8
|
interface ChevronProps extends IconProps {
|
|
5
9
|
direction?: Direction;
|
|
6
10
|
}
|
package/dist/svgs/ChevronIcon.js
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { Icon, Path } from "./Icon";
|
|
3
|
+
import { useColor } from "../utils/hooks";
|
|
4
|
+
export const ChevronRightIcon = ({ fill = "mono100", ...restProps }) => {
|
|
5
|
+
const color = useColor();
|
|
6
|
+
return (_jsx(Icon, { ...restProps, viewBox: "0 0 18 18", children: _jsx(Path, { d: "M6.62132 3L12.5 9L6.62132 15L5.5 13.8555L10.2574 9L5.5 4.14446L6.62132 3Z", fill: color(fill), fillRule: "nonzero" }) }));
|
|
7
|
+
};
|
|
8
|
+
export const ChevronUpIcon = ({ fill = "mono100", ...restProps }) => {
|
|
9
|
+
const color = useColor();
|
|
10
|
+
return (_jsx(Icon, { ...restProps, viewBox: "0 0 18 18", children: _jsx(Path, { d: "M3 11.3787L9 5.5L15 11.3787L13.8555 12.5L9 7.74264L4.14446 12.5L3 11.3787Z", fill: color(fill), fillRule: "nonzero" }) }));
|
|
11
|
+
};
|
|
12
|
+
export const ChevronLeftIcon = ({ fill = "mono100", ...restProps }) => {
|
|
13
|
+
const color = useColor();
|
|
14
|
+
return (_jsx(Icon, { ...restProps, viewBox: "0 0 18 18", children: _jsx(Path, { d: "M11.3787 15L5.5 9L11.3787 3L12.5 4.14446L7.74264 9L12.5 13.8555L11.3787 15Z", fill: color(fill), fillRule: "nonzero" }) }));
|
|
15
|
+
};
|
|
16
|
+
export const ChevronDownIcon = ({ fill = "mono100", ...restProps }) => {
|
|
17
|
+
const color = useColor();
|
|
18
|
+
return (_jsx(Icon, { ...restProps, viewBox: "0 0 18 18", children: _jsx(Path, { d: "M15 6.62132L9 12.5L3 6.62132L4.14446 5.5L9 10.2574L13.8555 5.5L15 6.62132Z", fill: color(fill), fillRule: "nonzero" }) }));
|
|
19
|
+
};
|
|
6
20
|
const directionMap = {
|
|
7
|
-
left:
|
|
8
|
-
right:
|
|
9
|
-
up:
|
|
10
|
-
down:
|
|
21
|
+
left: ChevronLeftIcon,
|
|
22
|
+
right: ChevronRightIcon,
|
|
23
|
+
up: ChevronUpIcon,
|
|
24
|
+
down: ChevronDownIcon,
|
|
11
25
|
};
|
|
12
26
|
export const ChevronIcon = ({ direction = "right", ...restProps }) => {
|
|
13
27
|
const Arrow = directionMap[direction];
|
package/package.json
CHANGED