@sequencing/design-system 1.0.24 → 1.0.26

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.
@@ -47,8 +47,25 @@ export interface HeaderProps {
47
47
  onLinkClick?: (url: string) => void;
48
48
  /** Called when an authenticated user clicks on the Sign Out button inside the main right HeaderChip */
49
49
  onRequestSignOut?: () => void;
50
- /** Called when a user clicks on the site's logo */
51
- onRequestHomePage?: () => void;
50
+ /**
51
+ * Called when a user clicks on the site's logo, provide url argument to callback.
52
+ * Typically used to make soft navigation in your framework (React, NextJs, etc).
53
+ * e.g. for NextJs `onRequestHomePage={(url) => router.push(url)}`
54
+ * url argument is the `homePageUrl` prop value.
55
+ */
56
+ onRequestHomePage?: (url: string) => void;
57
+ /**
58
+ * The URL of the site's home page. It will be used when the user clicks on the site's logo.
59
+ *
60
+ * PLEASE NOTE: If you want to use the SOFT navigation from your framework (React, NextJs, etc), you should
61
+ * path the `onRequestHomePage` prop and call the navigation method in the callback.
62
+ * e.g. for NextJs `onRequestHomePage={(url) => router.push(url)}`
63
+ * WARNING: Do not change or modify url argument inside your callback, because you will have undocumented behavior
64
+ * with your navigation. Your goal is only call the navigation method with the url argument.
65
+ * Default value is `/`.
66
+ * Without the `onRequestHomePage` prop, the component will use the default behavior of the anchor tag.
67
+ */
68
+ homePageUrl?: string;
52
69
  /** Called when an authenticated user clicks on the My Account link inside the main right HeaderChip */
53
70
  onRequestMyAccount?: () => void;
54
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequencing/design-system",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "Sequencing Design System",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\"",