Skip to content

Commit 0ac083a

Browse files
Add isHashRouter to types.ts and QuickNavCodePage
1 parent 985350e commit 0ac083a

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

apps/website/screens/components/quick-nav/code/QuickNavCodePage.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ const sections = [
2121
</tr>
2222
</thead>
2323
<tbody>
24+
<tr>
25+
<td>isHashRouter</td>
26+
<td>
27+
<TableCode>boolean</TableCode>
28+
</td>
29+
<td>
30+
If true, enables navigation to sections within the page using the onClick handler, ensuring compatibility
31+
with HashRouter.
32+
</td>
33+
<td>false</td>
34+
</tr>
2435
<tr>
2536
<td>
2637
<DxcFlex direction="column" gap="var(--spacing-gap-xs)" alignItems="baseline">

packages/lib/src/quick-nav/types.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ type Link = {
1010
};
1111

1212
type Props = {
13+
/**
14+
* If true, enables navigation to sections within the page using the onClick handler, ensuring compatibility with HashRouter.
15+
*/
16+
isHashRouter?: boolean;
1317
/**
1418
* Title of the quick nav component.
1519
*/
@@ -18,10 +22,6 @@ type Props = {
1822
* Links to be shown inside the quick nav component.
1923
*/
2024
links: Link[];
21-
/*
22-
* Links to be shown inside the quick nav component.
23-
*/
24-
isHashRouter?: boolean;
2525
};
2626

2727
export default Props;

0 commit comments

Comments
 (0)