umwd-components 0.1.143 → 0.1.145

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.
@@ -95,7 +95,8 @@ function HeroSection(_ref) {
95
95
  }, heading), /*#__PURE__*/React.createElement(material.Box, {
96
96
  sx: {
97
97
  height: {
98
- xs: "100px",
98
+ xs: "120px",
99
+ sm: "200px",
99
100
  md: "250px",
100
101
  lg: "350px"
101
102
  }
@@ -23,7 +23,7 @@ const ScrollLink = _ref => {
23
23
  ...props
24
24
  } = _ref;
25
25
  const handleScroll = e => {
26
- e.preventDefault();
26
+ //e.preventDefault();
27
27
 
28
28
  // remove everything before the hash
29
29
  const targetId = e.currentTarget.href.replace(/.*\#/, "");
@@ -138,7 +138,7 @@ function ScrollNavbar(_ref) {
138
138
  onClick: e => setCurrentTab(index)
139
139
  }, /*#__PURE__*/React.createElement(ScrollLink.default, {
140
140
  key: tab.name,
141
- href: "#".concat(tab.slug),
141
+ href: "/#".concat(tab.slug),
142
142
  style: {
143
143
  display: "block",
144
144
  height: "100%"
@@ -93,7 +93,8 @@ function HeroSection(_ref) {
93
93
  }, heading), /*#__PURE__*/React__default.createElement(Box, {
94
94
  sx: {
95
95
  height: {
96
- xs: "100px",
96
+ xs: "120px",
97
+ sm: "200px",
97
98
  md: "250px",
98
99
  lg: "350px"
99
100
  }
@@ -19,7 +19,7 @@ const ScrollLink = _ref => {
19
19
  ...props
20
20
  } = _ref;
21
21
  const handleScroll = e => {
22
- e.preventDefault();
22
+ //e.preventDefault();
23
23
 
24
24
  // remove everything before the hash
25
25
  const targetId = e.currentTarget.href.replace(/.*\#/, "");
@@ -134,7 +134,7 @@ function ScrollNavbar(_ref) {
134
134
  onClick: e => setCurrentTab(index)
135
135
  }, /*#__PURE__*/React__default.createElement(ScrollLink, {
136
136
  key: tab.name,
137
- href: "#".concat(tab.slug),
137
+ href: "/#".concat(tab.slug),
138
138
  style: {
139
139
  display: "block",
140
140
  height: "100%"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umwd-components",
3
- "version": "0.1.143",
3
+ "version": "0.1.145",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -122,7 +122,16 @@ export function HeroSection({ data }: Readonly<HeroSectionProps>) {
122
122
  <Typography variant="h2" align="center" component={"h1"}>
123
123
  {heading}
124
124
  </Typography>
125
- <Box sx={{ height: { xs: "100px", md: "250px", lg: "350px" } }} />
125
+ <Box
126
+ sx={{
127
+ height: {
128
+ xs: "120px",
129
+ sm: "200px",
130
+ md: "250px",
131
+ lg: "350px",
132
+ },
133
+ }}
134
+ />
126
135
  <Typography variant="h4" align="center" component={"h2"}>
127
136
  {subHeading}
128
137
  </Typography>
@@ -3,7 +3,6 @@
3
3
  // components/ScrollLink.tsx
4
4
  import Link, { LinkProps } from "next/link";
5
5
  import React, { PropsWithChildren } from "react";
6
- import { Box } from "@mui/system";
7
6
  import { useTheme } from "@mui/material";
8
7
 
9
8
  // mirror the props of next/link component
@@ -15,7 +14,7 @@ type ScrollLinkProps = AnchorProps & LinkProps & PropsWithChildren;
15
14
  // component definition
16
15
  const ScrollLink = ({ children, ...props }: ScrollLinkProps) => {
17
16
  const handleScroll = (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {
18
- e.preventDefault();
17
+ //e.preventDefault();
19
18
 
20
19
  // remove everything before the hash
21
20
  const targetId = e.currentTarget.href.replace(/.*\#/, "");
@@ -187,9 +187,22 @@ function ScrollNavbar({ data }: { readonly data: NavbarProps }) {
187
187
  tabs.map((tab: TabInfo, index: number) => {
188
188
  return (
189
189
  <Box key={tab.name} onClick={(e) => setCurrentTab(index)}>
190
+ {/* <Link
191
+
192
+ href={`#${tab.slug}`}
193
+ style={{
194
+ color: theme.palette.primary.contrastText,
195
+ textDecoration: "none",
196
+ cursor: "pointer",
197
+ }}
198
+ scroll={false}
199
+ >
200
+ {tab.name}
201
+ <Tab value={index} label={tab.name} />
202
+ </Link> */}
190
203
  <ScrollLink
191
204
  key={tab.name}
192
- href={`#${tab.slug}`}
205
+ href={`/#${tab.slug}`}
193
206
  style={{ display: "block", height: "100%" }}
194
207
  >
195
208
  <Tab value={index} label={tab.name} />