-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UI v2] feat: Adds prefect theming to storybook (#16482)
- Loading branch information
1 parent
981cde9
commit cbe7dd4
Showing
6 changed files
with
79 additions
and
6 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,14 @@ | ||
import { addons } from "@storybook/manager-api"; | ||
|
||
import favicon from "../public/ico/favicon-16x16-dark.png"; | ||
import { prefectLightTheme } from "./prefect-theme"; | ||
|
||
addons.setConfig({ | ||
theme: prefectLightTheme, | ||
}); | ||
|
||
// custom favicon | ||
const link = document.createElement("link"); | ||
link.setAttribute("rel", "shortcut icon"); | ||
link.setAttribute("href", favicon); | ||
document.head.appendChild(link); |
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,21 @@ | ||
import { create } from "@storybook/theming"; | ||
import LogoDark from "./logos/logo-dark.svg"; | ||
import LogoLight from "./logos/logo-light.svg"; | ||
|
||
const BASE_THEME = { | ||
brandTitle: "Prefect", | ||
brandUrl: "https://prefect.io", | ||
brandTarget: "_self", | ||
}; | ||
|
||
export const prefectLightTheme = create({ | ||
...BASE_THEME, | ||
base: "light", | ||
brandImage: LogoLight, | ||
}); | ||
|
||
export const prefectDarkTheme = create({ | ||
...BASE_THEME, | ||
base: "dark", | ||
brandImage: LogoDark, | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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