ag-common 0.0.62 → 0.0.63
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,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Chevron: ({ down, width, className, colour, }: {
|
|
2
|
+
export declare const Chevron: ({ down, width, className, colour, onToggle, }: {
|
|
3
3
|
colour?: string | undefined;
|
|
4
4
|
className?: string | undefined;
|
|
5
5
|
width?: string | undefined;
|
|
6
6
|
down: boolean;
|
|
7
|
+
onToggle?: (() => void) | undefined;
|
|
7
8
|
}) => JSX.Element;
|
|
@@ -20,6 +20,6 @@ const IconStyled = (0, styled_components_1.default)(Icon_1.Icon) `
|
|
|
20
20
|
`;
|
|
21
21
|
const ChevronIcon = (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -256 1792 1792" },
|
|
22
22
|
react_1.default.createElement("path", { d: "M1679.339 301.56q0 53-37 90l-651 651q-38 38-91 38-54 0-90-38l-651-651q-38-36-38-90 0-53 38-91l74-75q39-37 91-37 53 0 90 37l486 486 486-486q37-37 90-37 52 0 91 37l75 75q37 39 37 91z" })));
|
|
23
|
-
const Chevron = ({ down, width = '1.2rem', className, colour = 'black', }) => (react_1.default.createElement(SChevron, { className: className },
|
|
23
|
+
const Chevron = ({ down, width = '1.2rem', className, colour = 'black', onToggle, }) => (react_1.default.createElement(SChevron, { className: className, onClick: () => onToggle === null || onToggle === void 0 ? void 0 : onToggle(), onTouchStart: () => onToggle === null || onToggle === void 0 ? void 0 : onToggle(), onKeyPress: (e) => e.key === 'Enter' && (onToggle === null || onToggle === void 0 ? void 0 : onToggle()) },
|
|
24
24
|
react_1.default.createElement(IconStyled, { flip: down, fill: colour, width: width, height: width }, ChevronIcon)));
|
|
25
25
|
exports.Chevron = Chevron;
|