-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(storybook): add v1 page stories (#261)
- Loading branch information
Showing
29 changed files
with
3,602 additions
and
466 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
client/src/app/hooks/domain-controls/useSbomsOfVulnerability.mock.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import React from "react"; | ||
import { HeaderApp } from "@app/layout/header"; | ||
import { MemoryRouter } from "react-router-dom"; | ||
import { fn } from "@storybook/test"; | ||
import * as actual from "@app/hooks/useBranding"; | ||
|
||
const useBranding = fn(actual.useBranding).mockName("useBranding"); | ||
|
||
import { BrandingStrings } from "@trustify-ui/common"; | ||
|
||
const meta = { | ||
title: "Components/Layout/HeaderApp", | ||
component: HeaderApp, | ||
decorators: [ | ||
(Story) => ( | ||
<MemoryRouter initialEntries={["/"]}> | ||
<Story /> | ||
</MemoryRouter> | ||
), | ||
], | ||
} satisfies Meta<typeof HeaderApp>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
const mockBrandingStrings: BrandingStrings = { | ||
application: { | ||
title: "Mock Trustify", | ||
name: "Mock App", | ||
description: "A description of the mock application.", | ||
}, | ||
about: { | ||
displayName: "Mock Trustify Display Name", | ||
imageSrc: "/branding/images/masthead-logo.svg", | ||
documentationUrl: "https://mock-docs.example.com", | ||
}, | ||
masthead: { | ||
leftBrand: { | ||
src: "/mock-left-brand.svg", | ||
alt: "Mock Left Brand", | ||
height: "40px", | ||
}, | ||
leftTitle: { | ||
text: "Mock Left Title", | ||
heading: "h1", | ||
size: "xl", | ||
}, | ||
rightBrand: { | ||
src: "/mock-right-brand.svg", | ||
alt: "Mock Right Brand", | ||
height: "40px", | ||
}, | ||
}, | ||
}; | ||
|
||
export const Primary: Story = { | ||
args: { | ||
rightBrand: {}, | ||
}, | ||
async beforeEach() { | ||
useBranding.mockImplementation(() => mockBrandingStrings); | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.