allaw-ui 0.0.295 → 0.0.296
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/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
@import "../../../styles/colors.css";
|
|
2
|
-
|
|
3
|
-
.test-clic {
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
width: 300px;
|
|
8
|
-
height: 300px;
|
|
9
|
-
border: 1px solid var(--venom-grey, #e6edf5);
|
|
10
|
-
background-color: var(--venom-grey, #bad1ec);
|
|
11
|
-
border-radius: 8px;
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
transition: background-color 0.05s ease;
|
|
14
|
-
user-select: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.test-clic.active {
|
|
18
|
-
background-color: var(--dark-venom-grey, #9ab8d9);
|
|
19
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React, { useState, useCallback } from "react";
|
|
2
|
-
import "./TestClic.css";
|
|
3
|
-
import ActionCircleButton from "../../atoms/buttons/ActionCircleButton";
|
|
4
|
-
var TestClic = function () {
|
|
5
|
-
var _a = useState(false), isActive = _a[0], setIsActive = _a[1];
|
|
6
|
-
var handleApprove = useCallback(function () {
|
|
7
|
-
console.log("Approved");
|
|
8
|
-
}, []);
|
|
9
|
-
var handleReject = useCallback(function () {
|
|
10
|
-
console.log("Rejected");
|
|
11
|
-
}, []);
|
|
12
|
-
var handleMouseDown = function (e) {
|
|
13
|
-
if (!e.target.closest(".dual-button")) {
|
|
14
|
-
setIsActive(true);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
var handleMouseUp = function () {
|
|
18
|
-
setIsActive(false);
|
|
19
|
-
};
|
|
20
|
-
var handleClick = function (e) {
|
|
21
|
-
if (!e.target.closest(".dual-button")) {
|
|
22
|
-
console.log("card clicked");
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
return (React.createElement("div", { className: "test-clic ".concat(isActive ? "active" : ""), onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, onClick: handleClick },
|
|
26
|
-
React.createElement(ActionCircleButton, { status: "dual", onApprove: handleApprove, onReject: handleReject })));
|
|
27
|
-
};
|
|
28
|
-
export default TestClic;
|