allaw-ui 3.3.8 → 3.3.9
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.
|
@@ -8,5 +8,5 @@ export type EntityCardProps = {
|
|
|
8
8
|
onActionButtonClick?: () => void;
|
|
9
9
|
onCardClick?: () => void;
|
|
10
10
|
};
|
|
11
|
-
declare function EntityCard({ entityName, numberOfMembers, formatedAddress, immat, actionType, onActionButtonClick, onCardClick }: EntityCardProps): React.JSX.Element;
|
|
11
|
+
declare function EntityCard({ entityName, numberOfMembers, formatedAddress, immat, actionType, onActionButtonClick, onCardClick, }: EntityCardProps): React.JSX.Element;
|
|
12
12
|
export default EntityCard;
|
|
@@ -3,34 +3,36 @@ import styles from "./entityCard.module.css";
|
|
|
3
3
|
var ActionButton = function (_a) {
|
|
4
4
|
var type = _a.type, action = _a.action;
|
|
5
5
|
var elements = {
|
|
6
|
-
|
|
6
|
+
QUIT: {
|
|
7
7
|
text: "Quitter l'organisation",
|
|
8
8
|
icon: "allaw-icon-close",
|
|
9
9
|
color: "#E15151",
|
|
10
10
|
},
|
|
11
|
-
|
|
11
|
+
REQUEST: {
|
|
12
12
|
text: "Demander à rejoindre",
|
|
13
13
|
icon: "allaw-icon-arrow-right",
|
|
14
14
|
color: "#25BEEB",
|
|
15
15
|
},
|
|
16
|
-
|
|
16
|
+
REMOVE_REQUEST: {
|
|
17
17
|
text: "Annuler la demande",
|
|
18
18
|
icon: "allaw-icon-close",
|
|
19
19
|
color: "#E15151",
|
|
20
20
|
},
|
|
21
|
-
|
|
21
|
+
NONE: {
|
|
22
22
|
text: "",
|
|
23
23
|
icon: "",
|
|
24
24
|
color: "",
|
|
25
|
-
}
|
|
25
|
+
},
|
|
26
26
|
};
|
|
27
|
-
return React.createElement("button", { style: { color: elements[type].color }, className: styles.actionButton, onClick: function () {
|
|
27
|
+
return (React.createElement("button", { style: { color: elements[type].color }, className: styles.actionButton, onClick: function () {
|
|
28
|
+
action && action();
|
|
29
|
+
} },
|
|
28
30
|
elements[type].text,
|
|
29
|
-
React.createElement("i", { className: elements[type].icon }));
|
|
31
|
+
React.createElement("i", { className: elements[type].icon })));
|
|
30
32
|
};
|
|
31
33
|
function EntityCard(_a) {
|
|
32
34
|
var entityName = _a.entityName, numberOfMembers = _a.numberOfMembers, formatedAddress = _a.formatedAddress, immat = _a.immat, actionType = _a.actionType, onActionButtonClick = _a.onActionButtonClick, onCardClick = _a.onCardClick;
|
|
33
|
-
return React.createElement("div", { className: styles.card, style: { cursor: onCardClick ? "pointer" : "default" }, onClick: function () { return onCardClick && onCardClick(); } },
|
|
35
|
+
return (React.createElement("div", { className: styles.card, style: { cursor: onCardClick ? "pointer" : "default" }, onClick: function () { return onCardClick && onCardClick(); } },
|
|
34
36
|
React.createElement("div", { className: styles.picturePlaceHolder },
|
|
35
37
|
React.createElement("i", { className: "allaw-icon-home" })),
|
|
36
38
|
React.createElement("div", { className: styles.dataInfo },
|
|
@@ -46,6 +48,6 @@ function EntityCard(_a) {
|
|
|
46
48
|
React.createElement("span", { className: styles.detail },
|
|
47
49
|
React.createElement("i", { className: "allaw-icon-prestation" }),
|
|
48
50
|
immat))),
|
|
49
|
-
actionType != "NONE" && React.createElement(ActionButton, { type: actionType, action: onActionButtonClick
|
|
51
|
+
actionType != "NONE" && (React.createElement(ActionButton, { type: actionType, action: onActionButtonClick }))));
|
|
50
52
|
}
|
|
51
53
|
export default EntityCard;
|