diff --git a/.gitignore b/.gitignore
index 693618f..3446297 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,6 @@ node_modules
dist
storybook-static
-.npmrc
\ No newline at end of file
+.npmrc
+
+.vscode
diff --git a/src/lib-components/IconRender/index.tsx b/src/lib-components/IconRender/index.tsx
index 961afea..ecfa59e 100644
--- a/src/lib-components/IconRender/index.tsx
+++ b/src/lib-components/IconRender/index.tsx
@@ -12,7 +12,7 @@ export function IconRenderer({
IconComponent
}: IconRendererProps) {
return (
-
+
{iconUrl && (
![]()
void;
- searchDropdownLabelsList?: string[];
logoutFunction?: () => void;
user?: User;
sideMenuLinks?: SideMenuLink[];
@@ -140,9 +140,9 @@ export const Navbar = ({
{logoSrc && (
-
+
-
+
)}
{h1 ? (
@@ -292,9 +292,9 @@ export const Navbar = ({
>
)}
{logoSrc && (
-
+
-
+
)}
{hiddenUser ? (
diff --git a/src/lib-components/Navbar/styles.ts b/src/lib-components/Navbar/styles.ts
index 8b3055e..d965e6a 100644
--- a/src/lib-components/Navbar/styles.ts
+++ b/src/lib-components/Navbar/styles.ts
@@ -142,3 +142,9 @@ export const StyledSystemMenu = styled(Menu)`
padding-bottom: 0px;
}
`;
+
+export const StyledLogoLink = styled.a`
+ display: flex;
+ align-items: center;
+ text-decoration: none;
+`;
diff --git a/src/stories/ErrorScreen.stories.tsx b/src/stories/ErrorScreen.stories.tsx
new file mode 100644
index 0000000..602b9cf
--- /dev/null
+++ b/src/stories/ErrorScreen.stories.tsx
@@ -0,0 +1,62 @@
+import { ErrorScreen, httpErrors } from '../lib-components/ErrorScreen';
+import { BrowserRouter } from 'react-router-dom';
+import { Meta, StoryFn } from '@storybook/react';
+
+export default {
+ title: 'Components/ErrorScreen',
+ component: ErrorScreen,
+ argTypes: {
+ errorType: {
+ name: 'errorType',
+ description: 'Type of error to be displayed',
+ required: true,
+ options: [
+ httpErrors.NOTFOUND_404,
+ httpErrors.COMINGSOON_501,
+ httpErrors.INACTIVE_503,
+ httpErrors.MAINTENANCE_503
+ ],
+ control: {
+ type: 'radio',
+ labels: {
+ [httpErrors.NOTFOUND_404]: 'Not Found',
+ [httpErrors.COMINGSOON_501]: 'Coming Soon',
+ [httpErrors.INACTIVE_503]: 'Inactive',
+ [httpErrors.MAINTENANCE_503]: 'Maintenance'
+ }
+ }
+ }
+ }
+} as Meta;
+
+interface ErrorScreenStoryProps {
+ errorType: httpErrors;
+}
+
+const Template: StoryFn = (args) => {
+ return (
+
+
+
+ );
+};
+
+export const NotFoundPage_ = Template.bind({});
+NotFoundPage_.args = {
+ errorType: httpErrors.NOTFOUND_404
+};
+
+export const ComingSoonPage_ = Template.bind({});
+ComingSoonPage_.args = {
+ errorType: httpErrors.COMINGSOON_501
+};
+
+export const InactivePage_ = Template.bind({});
+InactivePage_.args = {
+ errorType: httpErrors.INACTIVE_503
+};
+
+export const MaintenancePage_ = Template.bind({});
+MaintenancePage_.args = {
+ errorType: httpErrors.MAINTENANCE_503
+};
diff --git a/src/stories/Navbar.stories.tsx b/src/stories/Navbar.stories.tsx
index 4475aa3..1a2be0d 100644
--- a/src/stories/Navbar.stories.tsx
+++ b/src/stories/Navbar.stories.tsx
@@ -22,6 +22,8 @@ export default {
export interface NavbarStoryProps {
isLandingPage: boolean;
+ logoRedirectUrl?: string;
+ logoSrc?: string;
haveSearchBar: boolean;
hiddenUser: boolean;
user: User;
@@ -30,7 +32,9 @@ export interface NavbarStoryProps {
systemsListPopup: boolean;
title: string;
systemsList: System[];
- iconComponent: JSXElementConstructor;
+ currentSystemIconUrl?: string;
+ children: JSX.Element;
+ IconComponent: JSXElementConstructor;
}
interface IconComponentProps {
@@ -50,6 +54,9 @@ const Template: StoryFn = (args) => {
<>>
+ IconComponent: () => <>>
};
diff --git a/src/stories/utils/argTypes.ts b/src/stories/utils/argTypes.ts
index bf6e3ec..b760087 100644
--- a/src/stories/utils/argTypes.ts
+++ b/src/stories/utils/argTypes.ts
@@ -112,6 +112,24 @@ export const navbarArgTypes = {
category: 'Navbar'
}
},
+ logoRedirectUrl: {
+ name: 'logoRedirectUrl',
+ type: { name: 'string', required: false },
+ description: 'String wich defines the href of the logo',
+ control: { type: 'text' },
+ table: {
+ category: 'Navbar'
+ }
+ },
+ logoSrc: {
+ name: 'logoSrc',
+ type: { name: 'string', required: false },
+ description: 'String wich defines the src of the logo',
+ control: { type: 'text' },
+ table: {
+ category: 'Navbar'
+ }
+ },
haveSearchBar: {
name: 'haveSearchBar',
type: { name: 'boolean', required: false },
@@ -193,8 +211,17 @@ export const navbarArgTypes = {
category: 'Navbar'
}
},
- iconComponent: {
- name: 'iconComponent',
+ currentSystemIconUrl: {
+ name: 'currentSystemIconUrl',
+ type: { name: 'string', required: false },
+ description: 'String wich defines the current system icon',
+ control: { type: 'text' },
+ table: {
+ category: 'Navbar'
+ }
+ },
+ IconComponent: {
+ name: 'IconComponent',
description: 'Icon of system that appears in navbar',
table: {
category: 'Navbar'