allaw-ui 0.0.327 → 0.0.328

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,6 +6,7 @@ export interface OAuthProviderButtonProps {
6
6
  type: "login" | "signup";
7
7
  url: string;
8
8
  size: 14 | 16 | 18 | 20 | 22 | 24;
9
+ onClick?: () => void;
9
10
  }
10
11
  declare const OAuthProviderButton: React.FC<OAuthProviderButtonProps>;
11
12
  export default OAuthProviderButton;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import "./OAuthProviderButton.css";
3
3
  import "../../../styles/global.css";
4
4
  var OAuthProviderButton = function (_a) {
5
- var provider = _a.provider, type = _a.type, url = _a.url, size = _a.size;
5
+ var provider = _a.provider, type = _a.type, url = _a.url, size = _a.size, onClick = _a.onClick;
6
6
  var getLabel = function () {
7
7
  if (provider === "google") {
8
8
  return type === "login"
@@ -30,7 +30,12 @@ var OAuthProviderButton = function (_a) {
30
30
  }
31
31
  };
32
32
  var handleClick = function () {
33
- window.location.href = url;
33
+ if (onClick) {
34
+ onClick();
35
+ }
36
+ else {
37
+ window.location.href = url;
38
+ }
34
39
  };
35
40
  var getMaxWidth = function () {
36
41
  switch (size) {
@@ -51,7 +51,6 @@
51
51
  width: 100%;
52
52
  flex-direction: column;
53
53
  align-items: flex-start;
54
-
55
54
  border-radius: 8px;
56
55
  border: 1px solid rgba(114, 142, 167, 1);
57
56
  background: var(--Primary-Blanc, #fff);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "0.0.327",
3
+ "version": "0.0.328",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -43,6 +43,7 @@
43
43
  "next": "14.2.5",
44
44
  "react": "^17.0.0 || ^18.0.0",
45
45
  "react-dom": "^17.0.0 || ^18.0.0",
46
+ "react-hook-form": "^7.53.0",
46
47
  "typeface-open-sans": "^1.1.13"
47
48
  },
48
49
  "devDependencies": {