allaw-ui 4.4.9 → 4.5.1
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/dist/components/atoms/buttons/ActionButton.d.ts +1 -1
- package/dist/components/atoms/buttons/ActionButton.js +1 -1
- package/dist/components/atoms/buttons/ActionButton.module.css +13 -0
- package/dist/components/atoms/buttons/ActionButton.stories.d.ts +2 -0
- package/dist/components/atoms/buttons/ActionButton.stories.js +5 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ export interface ActionButtonProps extends ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
10
10
|
fullWidth?: boolean;
|
|
11
11
|
type?: "button" | "submit" | "reset";
|
|
12
12
|
isLoading?: boolean;
|
|
13
|
-
variant?: "default" | "warning";
|
|
13
|
+
variant?: "default" | "warning" | "yellow";
|
|
14
14
|
size?: "medium" | "large";
|
|
15
15
|
dataTestId?: string;
|
|
16
16
|
}
|
|
@@ -107,7 +107,7 @@ var ActionButton = forwardRef(function (_a, ref) {
|
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
}); };
|
|
110
|
-
return (React.createElement("button", __assign({ ref: buttonRef, "data-testid": props.dataTestId, className: "".concat(styles.actionButton, " ").concat(disabled ? styles.actionButtonDisabled : styles.actionButtonEnabled, " ").concat(fullWidth ? styles.actionButtonFullWidth : "", " ").concat(isButtonLoading ? styles.actionButtonLoading : "", " ").concat(variant === "warning" ? styles.actionButtonWarning : "", " ").concat(size === "large" ? styles.actionButtonLarge : ""), disabled: disabled, onClick: handleClick, type: type }, props),
|
|
110
|
+
return (React.createElement("button", __assign({ ref: buttonRef, "data-testid": props.dataTestId, className: "".concat(styles.actionButton, " ").concat(disabled ? styles.actionButtonDisabled : styles.actionButtonEnabled, " ").concat(fullWidth ? styles.actionButtonFullWidth : "", " ").concat(isButtonLoading ? styles.actionButtonLoading : "", " ").concat(variant === "warning" ? styles.actionButtonWarning : "", " ").concat(variant === "yellow" ? styles.actionButtonYellow : "", " ").concat(size === "large" ? styles.actionButtonLarge : ""), disabled: disabled, onClick: handleClick, type: type }, props),
|
|
111
111
|
startIcon && (React.createElement("span", { className: "".concat(styles.actionButtonIcon, " ").concat(startIconName) })),
|
|
112
112
|
React.createElement("span", { className: styles.actionButtonLabel }, label),
|
|
113
113
|
isButtonLoading ? (React.createElement("span", { className: styles.actionButtonLoadingDots }, loadingDots)) : (endIcon && (React.createElement("span", { className: "".concat(styles.actionButtonIcon, " ").concat(endIconName) })))));
|
|
@@ -90,6 +90,19 @@
|
|
|
90
90
|
background: rgba(225, 81, 81, 0.1);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
.actionButtonYellow {
|
|
94
|
+
background: #f9e000;
|
|
95
|
+
color: var(--primary-black, #171e25);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.actionButtonYellow:hover {
|
|
99
|
+
background: #e6d000;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.actionButtonYellow:active {
|
|
103
|
+
background: #c7b200;
|
|
104
|
+
}
|
|
105
|
+
|
|
93
106
|
@keyframes pulseBackground {
|
|
94
107
|
0% {
|
|
95
108
|
background-color: var(--Primary-Mid-black, #171e25);
|
|
@@ -105,4 +105,6 @@ export const WarningButton: any;
|
|
|
105
105
|
export const LargeButton: any;
|
|
106
106
|
export const LargeButtonWithIcons: any;
|
|
107
107
|
export const LargeWarningButton: any;
|
|
108
|
+
export const YellowButton: any;
|
|
109
|
+
export const LargeYellowButton: any;
|
|
108
110
|
import ActionButton from "./ActionButton";
|
|
@@ -97,7 +97,7 @@ export default {
|
|
|
97
97
|
variant: {
|
|
98
98
|
control: {
|
|
99
99
|
type: "select",
|
|
100
|
-
options: ["default", "warning"],
|
|
100
|
+
options: ["default", "warning", "yellow"],
|
|
101
101
|
},
|
|
102
102
|
},
|
|
103
103
|
size: {
|
|
@@ -165,3 +165,7 @@ export var LargeButtonWithIcons = Template.bind({});
|
|
|
165
165
|
LargeButtonWithIcons.args = __assign(__assign({}, Default.args), { label: "Grand Bouton avec Icônes", startIcon: true, endIcon: true, size: "large" });
|
|
166
166
|
export var LargeWarningButton = Template.bind({});
|
|
167
167
|
LargeWarningButton.args = __assign(__assign({}, Default.args), { label: "Grand Bouton d'Alerte", variant: "warning", size: "large" });
|
|
168
|
+
export var YellowButton = Template.bind({});
|
|
169
|
+
YellowButton.args = __assign(__assign({}, Default.args), { label: "Bouton Jaune", variant: "yellow" });
|
|
170
|
+
export var LargeYellowButton = Template.bind({});
|
|
171
|
+
LargeYellowButton.args = __assign(__assign({}, Default.args), { label: "Grand Bouton Jaune", variant: "yellow", size: "large" });
|