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.
- package/dist/cjs/components/HeroSection.js +2 -1
- package/dist/cjs/components/ScrollLink.js +1 -1
- package/dist/cjs/components/ScrollNavbar.js +1 -1
- package/dist/esm/components/HeroSection.js +2 -1
- package/dist/esm/components/ScrollLink.js +1 -1
- package/dist/esm/components/ScrollNavbar.js +1 -1
- package/package.json +1 -1
- package/src/components/HeroSection.tsx +10 -1
- package/src/components/ScrollLink.tsx +1 -2
- package/src/components/ScrollNavbar.tsx +14 -1
|
@@ -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: "
|
|
141
|
+
href: "/#".concat(tab.slug),
|
|
142
142
|
style: {
|
|
143
143
|
display: "block",
|
|
144
144
|
height: "100%"
|
|
@@ -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: "
|
|
137
|
+
href: "/#".concat(tab.slug),
|
|
138
138
|
style: {
|
|
139
139
|
display: "block",
|
|
140
140
|
height: "100%"
|
package/package.json
CHANGED
|
@@ -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
|
|
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={
|
|
205
|
+
href={`/#${tab.slug}`}
|
|
193
206
|
style={{ display: "block", height: "100%" }}
|
|
194
207
|
>
|
|
195
208
|
<Tab value={index} label={tab.name} />
|