allaw-ui 0.0.325 → 0.0.327

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.
@@ -6,7 +6,6 @@
6
6
  justify-content: center;
7
7
  gap: 15px;
8
8
  cursor: pointer;
9
- max-width: 400px;
10
9
  min-width: 210px;
11
10
  border-radius: 10px;
12
11
  padding: 6px;
@@ -32,7 +32,25 @@ var OAuthProviderButton = function (_a) {
32
32
  var handleClick = function () {
33
33
  window.location.href = url;
34
34
  };
35
- return (React.createElement("button", { className: "oauth-provider-button ".concat(provider), onClick: handleClick, style: { height: "".concat(size * 2.25, "px") } },
35
+ var getMaxWidth = function () {
36
+ switch (size) {
37
+ case 14:
38
+ return "200px";
39
+ case 16:
40
+ return "300px";
41
+ case 18:
42
+ return "320px";
43
+ case 20:
44
+ return "370px";
45
+ case 22:
46
+ return "380px";
47
+ case 24:
48
+ return "400px";
49
+ default:
50
+ return "400px";
51
+ }
52
+ };
53
+ return (React.createElement("button", { className: "oauth-provider-button ".concat(provider), onClick: handleClick, style: { height: "".concat(size * 2.55, "px"), maxWidth: getMaxWidth() } },
36
54
  renderIcon(),
37
55
  React.createElement("span", { className: "label", style: { fontSize: "".concat(size, "px") } }, getLabel())));
38
56
  };
@@ -10,6 +10,7 @@ export interface PrimaryButtonProps extends ButtonHTMLAttributes<HTMLButtonEleme
10
10
  disabled?: boolean;
11
11
  onClick?: () => void;
12
12
  fullWidth?: boolean;
13
+ type?: "button" | "submit" | "reset";
13
14
  }
14
15
  declare const PrimaryButton: React.FC<PrimaryButtonProps>;
15
16
  export default PrimaryButton;
@@ -2,8 +2,8 @@ import React from "react";
2
2
  import "./PrimaryButton.css";
3
3
  import "../../../styles/global.css";
4
4
  var PrimaryButton = function (_a) {
5
- var startIcon = _a.startIcon, endIcon = _a.endIcon, startIconName = _a.startIconName, endIconName = _a.endIconName, label = _a.label, _b = _a.disabled, disabled = _b === void 0 ? false : _b, onClick = _a.onClick, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _c;
6
- return (React.createElement("button", { className: "primary-button ".concat(disabled ? "primary-button-disabled" : "primary-button-enabled", " ").concat(fullWidth ? "primary-button-full-width" : ""), disabled: disabled, onClick: onClick },
5
+ var startIcon = _a.startIcon, endIcon = _a.endIcon, startIconName = _a.startIconName, endIconName = _a.endIconName, label = _a.label, _b = _a.disabled, disabled = _b === void 0 ? false : _b, onClick = _a.onClick, _c = _a.fullWidth, fullWidth = _c === void 0 ? false : _c, _d = _a.type, type = _d === void 0 ? "button" : _d;
6
+ return (React.createElement("button", { className: "primary-button ".concat(disabled ? "primary-button-disabled" : "primary-button-enabled", " ").concat(fullWidth ? "primary-button-full-width" : ""), disabled: disabled, onClick: onClick, type: type },
7
7
  startIcon && React.createElement("span", { className: "primary-button-icon ".concat(startIconName) }),
8
8
  React.createElement("span", { className: "primary-button-label" }, label),
9
9
  endIcon && React.createElement("span", { className: "primary-button-icon ".concat(endIconName) })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "0.0.325",
3
+ "version": "0.0.327",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",