diff --git a/ui-components/.storybook/preview-head.html b/ui-components/.storybook/preview-head.html new file mode 100644 index 0000000000..56955b37e7 --- /dev/null +++ b/ui-components/.storybook/preview-head.html @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/ui-components/src/config/NavigationContext.tsx b/ui-components/src/config/NavigationContext.tsx index 96e84d3d65..bc3e4a4e8d 100644 --- a/ui-components/src/config/NavigationContext.tsx +++ b/ui-components/src/config/NavigationContext.tsx @@ -26,7 +26,19 @@ export interface NavigationContextProps { } export const NavigationContext = createContext({ - LinkComponent: (props) => {props.children}, + // Replace with an official app solution + LinkComponent: (props) => ( + { + e.preventDefault() + alert(`You clicked: ${props.href}`) + }} + > + {props.children} + + ), router: { push: () => { // no-op diff --git a/ui-components/src/navigation/LanguageNav.stories.tsx b/ui-components/src/navigation/LanguageNav.stories.tsx index da8c17dbad..9f7ac35909 100644 --- a/ui-components/src/navigation/LanguageNav.stories.tsx +++ b/ui-components/src/navigation/LanguageNav.stories.tsx @@ -3,7 +3,7 @@ import React from "react" import { LanguageNav } from "./LanguageNav" export default { - title: "LanguageNav", + title: "Navigation/LanguageNav", decorators: [(storyFn: any) =>
{storyFn()}
], }