umwd-components 0.1.230 → 0.1.232

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.
@@ -29,7 +29,8 @@ function ScrollNavbar(_ref) {
29
29
  tabs,
30
30
  maxWidth,
31
31
  minHeight,
32
- sx = {}
32
+ sx = {},
33
+ home_url = "/#home"
33
34
  } = data;
34
35
  const [mobileNavOpen, setMobileNavOpen] = React.useState(false);
35
36
  const [currentTab, setCurrentTab] = React.useState(0);
@@ -70,7 +71,7 @@ function ScrollNavbar(_ref) {
70
71
  }
71
72
  }
72
73
  }, /*#__PURE__*/React.createElement(Link, {
73
- href: "#home",
74
+ href: "/#home",
74
75
  style: {
75
76
  color: theme.palette.primary.contrastText,
76
77
  textDecoration: "none",
@@ -34,7 +34,8 @@ function RegisterForm(_ref) {
34
34
  subtitle = "Enter your details to create a new account",
35
35
  maxWidth,
36
36
  sx = {},
37
- glass = false
37
+ glass = false,
38
+ signin_url = "/signin"
38
39
  } = data;
39
40
  const [formState, formAction] = reactDom.useFormState(authActions.registerUserAction, INITIAL_STATE);
40
41
  const theme = styles.useTheme();
@@ -89,7 +90,7 @@ function RegisterForm(_ref) {
89
90
  pt: 2
90
91
  }
91
92
  }, "Have an account?"), /*#__PURE__*/React.createElement(Link, {
92
- href: "signin"
93
+ href: signin_url
93
94
  }, "Sing In")));
94
95
  }
95
96
 
@@ -35,7 +35,8 @@ function SigninForm(_ref) {
35
35
  subtitle = "Enter your details to sign in to your account",
36
36
  maxWidth,
37
37
  sx = {},
38
- glass = false
38
+ glass = false,
39
+ registration_url = "/signup"
39
40
  } = data;
40
41
  const [formState, formAction] = reactDom.useFormState(authActions.loginUserAction, INITIAL_STATE);
41
42
  const theme = styles.useTheme();
@@ -83,7 +84,7 @@ function SigninForm(_ref) {
83
84
  },
84
85
  variant: "body2"
85
86
  }, "Don't have an account?"), /*#__PURE__*/React.createElement(Link, {
86
- href: "signup"
87
+ href: registration_url
87
88
  }, "Sign Up")));
88
89
  }
89
90
 
@@ -25,7 +25,8 @@ function ScrollNavbar(_ref) {
25
25
  tabs,
26
26
  maxWidth,
27
27
  minHeight,
28
- sx = {}
28
+ sx = {},
29
+ home_url = "/#home"
29
30
  } = data;
30
31
  const [mobileNavOpen, setMobileNavOpen] = useState(false);
31
32
  const [currentTab, setCurrentTab] = useState(0);
@@ -66,7 +67,7 @@ function ScrollNavbar(_ref) {
66
67
  }
67
68
  }
68
69
  }, /*#__PURE__*/React__default.createElement(Link, {
69
- href: "#home",
70
+ href: "/#home",
70
71
  style: {
71
72
  color: theme.palette.primary.contrastText,
72
73
  textDecoration: "none",
@@ -30,7 +30,8 @@ function RegisterForm(_ref) {
30
30
  subtitle = "Enter your details to create a new account",
31
31
  maxWidth,
32
32
  sx = {},
33
- glass = false
33
+ glass = false,
34
+ signin_url = "/signin"
34
35
  } = data;
35
36
  const [formState, formAction] = useFormState(registerUserAction, INITIAL_STATE);
36
37
  const theme = useTheme();
@@ -85,7 +86,7 @@ function RegisterForm(_ref) {
85
86
  pt: 2
86
87
  }
87
88
  }, "Have an account?"), /*#__PURE__*/React__default.createElement(Link, {
88
- href: "signin"
89
+ href: signin_url
89
90
  }, "Sing In")));
90
91
  }
91
92
 
@@ -31,7 +31,8 @@ function SigninForm(_ref) {
31
31
  subtitle = "Enter your details to sign in to your account",
32
32
  maxWidth,
33
33
  sx = {},
34
- glass = false
34
+ glass = false,
35
+ registration_url = "/signup"
35
36
  } = data;
36
37
  const [formState, formAction] = useFormState(loginUserAction, INITIAL_STATE);
37
38
  const theme = useTheme();
@@ -79,7 +80,7 @@ function SigninForm(_ref) {
79
80
  },
80
81
  variant: "body2"
81
82
  }, "Don't have an account?"), /*#__PURE__*/React__default.createElement(Link, {
82
- href: "signup"
83
+ href: registration_url
83
84
  }, "Sign Up")));
84
85
  }
85
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umwd-components",
3
- "version": "0.1.230",
3
+ "version": "0.1.232",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -56,10 +56,20 @@ interface NavbarProps {
56
56
  maxWidth: MaxWidth;
57
57
  minHeight: string;
58
58
  sx?: SxProps<Theme>;
59
+ home_url?: string;
59
60
  }
60
61
 
61
62
  function ScrollNavbar({ data }: { readonly data: NavbarProps }) {
62
- const { site_title, logo, pages, tabs, maxWidth, minHeight, sx = {} } = data;
63
+ const {
64
+ site_title,
65
+ logo,
66
+ pages,
67
+ tabs,
68
+ maxWidth,
69
+ minHeight,
70
+ sx = {},
71
+ home_url = "/#home",
72
+ } = data;
63
73
 
64
74
  const [mobileNavOpen, setMobileNavOpen] = useState(false);
65
75
  const [currentTab, setCurrentTab] = useState(0);
@@ -110,7 +120,7 @@ function ScrollNavbar({ data }: { readonly data: NavbarProps }) {
110
120
  >
111
121
  {/* logo and site title for big screens */}
112
122
  <Link
113
- href={`#home`}
123
+ href={`/#home`}
114
124
  style={{
115
125
  color: theme.palette.primary.contrastText,
116
126
  textDecoration: "none",
@@ -36,6 +36,7 @@ interface RegisterFormProps {
36
36
  maxWidth: MaxWidth;
37
37
  sx?: SxProps<Theme>;
38
38
  glass?: boolean;
39
+ signin_url?: string;
39
40
  }
40
41
 
41
42
  function RegisterForm({ data }: { readonly data: RegisterFormProps }) {
@@ -45,6 +46,7 @@ function RegisterForm({ data }: { readonly data: RegisterFormProps }) {
45
46
  maxWidth,
46
47
  sx = {},
47
48
  glass = false,
49
+ signin_url = "/signin",
48
50
  } = data;
49
51
 
50
52
  const [formState, formAction] = useFormState(
@@ -109,7 +111,7 @@ function RegisterForm({ data }: { readonly data: RegisterFormProps }) {
109
111
  <Typography variant="body2" sx={{ pt: 2 }}>
110
112
  Have an account?
111
113
  </Typography>
112
- <Link href="signin">Sing In</Link>
114
+ <Link href={signin_url}>Sing In</Link>
113
115
  </form>
114
116
  </Container>
115
117
  );
@@ -39,6 +39,7 @@ interface SigninFormProps {
39
39
  maxWidth: MaxWidth;
40
40
  sx?: SxProps<Theme>;
41
41
  glass?: boolean;
42
+ registration_url?: string;
42
43
  }
43
44
 
44
45
  function SigninForm({ data }: { readonly data: SigninFormProps }) {
@@ -48,6 +49,7 @@ function SigninForm({ data }: { readonly data: SigninFormProps }) {
48
49
  maxWidth,
49
50
  sx = {},
50
51
  glass = false,
52
+ registration_url = "/signup",
51
53
  } = data;
52
54
 
53
55
  const [formState, formAction] = useFormState(loginUserAction, INITIAL_STATE);
@@ -100,7 +102,7 @@ function SigninForm({ data }: { readonly data: SigninFormProps }) {
100
102
  <Typography sx={{ pt: 2 }} variant="body2">
101
103
  Don't have an account?
102
104
  </Typography>
103
- <Link href="signup">Sign Up</Link>
105
+ <Link href={registration_url}>Sign Up</Link>
104
106
  </form>
105
107
  </Container>
106
108
  );
@@ -10,4 +10,4 @@ const Template = ({ ...args }) => <SigninForm data={{ ...args }} />;
10
10
 
11
11
  export const HelloWorld = Template.bind({});
12
12
 
13
- HelloWorld.args = { maxWidth: "md" };
13
+ HelloWorld.args = { maxWidth: "sm", registration_url: "/register" };