Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: configure storybook theme #3152

Merged
merged 10 commits into from
Aug 30, 2024
42 changes: 42 additions & 0 deletions .storybook/AsyncAPIStorybookTheme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { create } from '@storybook/theming/create';

export default create({
// Brand Information
brandTitle: 'AsyncAPI Initiative',
brandUrl: 'https://www.asyncapi.com/',
brandImage: 'img/logos/asyncapi-horizontal-logo.svg',
brandTarget: '_blank',

// Typography
fontBase: '"Work Sans", sans-serif',
fontCode: 'monospace',


// Themes
base: 'light',

/* -- FULL THEME IS NOT BEING USED DUE TO LACK OF STORYBOOK SUPPORT FOR CUSTOMIZING THE SETTINGS & ACTIONS BAR BG/TEXTCOLOR INDEPENDENTLY. --
colorPrimary: '#47BCEE',
colorSecondary: '#8851FB',

// UI
appBg: '#1b1130',
appContentBg: '#ffffff',
appPreviewBg: '#ffffff',
appBorderColor: '#dfe6ea',
appBorderRadius: 4,

// Text colors
textColor: '#ffffff',
textInverseColor: '#ffffff',
textMutedColor: '#5c6870',
inputTextColor: '#2e3438',

// Toolbar
barTextColor: '#9E9E9E',

// Toolbar default and active colors
booleanBg: '#dfe6ea',
booleanSelectedBg: '#8851FB'
*/
});
6 changes: 6 additions & 0 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from '@storybook/manager-api';
import AsyncAPIStorybookTheme from './AsyncAPIStorybookTheme';

addons.setConfig({
theme: AsyncAPIStorybookTheme,
});
2 changes: 2 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import "../styles/globals.css";
import type { Preview } from "@storybook/react";
import { themes } from '@storybook/theming';
import {
Title,
Subtitle,
Expand All @@ -20,6 +21,7 @@ const preview: Preview = {
},
},
docs: {
theme: themes.light,
toc: {
title: 'Table of contents',
},
Expand Down
82 changes: 82 additions & 0 deletions public/img/logos/asyncapi-horizontal-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 82 additions & 0 deletions public/img/logos/asyncapi-horizontal-white-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading