Skip to content

Commit

Permalink
feat: configure storybook theme (#3152)
Browse files Browse the repository at this point in the history
Co-authored-by: Akshat Nema <[email protected]>%0ACo-authored-by: Ansh Goyal <[email protected]>
  • Loading branch information
devilkiller-ag and anshgoyalevil authored Aug 30, 2024
1 parent abac53e commit b28b29b
Show file tree
Hide file tree
Showing 5 changed files with 214 additions and 0 deletions.
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-white-logo.svg',
brandTarget: '_blank',

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


// Themes
base: 'dark',

/* -- 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.

0 comments on commit b28b29b

Please sign in to comment.