Skip to content

Commit

Permalink
Project: Adding docs to Storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
rokotyan committed Dec 18, 2024
1 parent 1c89641 commit e5582f8
Show file tree
Hide file tree
Showing 15 changed files with 2,439 additions and 155 deletions.
11 changes: 11 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
import type { StorybookConfig } from "@storybook/html-vite";
import remarkGfm from 'remark-gfm';

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@jls-digital/storybook-addon-code",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
{
name: '@storybook/addon-docs',
options: {
mdxPluginOptions: {
mdxCompileOptions: {
remarkPlugins: [remarkGfm],
},
},
},
},
],
framework: {
name: "@storybook/html-vite",
Expand Down
1 change: 1 addition & 0 deletions .storybook/manager-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link rel="icon" type="image/png" href="https://cosmograph.app/img/favicon.png" />
12 changes: 10 additions & 2 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import { addons } from '@storybook/manager-api';
import { themes } from '@storybook/theming';
import { create } from '@storybook/theming';

const theme = create({
base: 'dark',
brandTitle: 'Cosmos',
brandUrl: 'https://cosmograph.app',
brandImage: 'https://github.com/user-attachments/assets/f1d7540e-7791-4c5c-9804-65b9d45acd7e',
brandTarget: '_self',
});

addons.setConfig({
theme: themes.dark,
theme,
});
2 changes: 2 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { Preview } from "@storybook/html";
import { themes } from '@storybook/theming';

import './style.css';

const preview: Preview = {
parameters: {
layout: 'fullscreen',
Expand Down
3 changes: 3 additions & 0 deletions .storybook/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tr:nth-of-type(2n) {
background-color: #1e2326;
}
3 changes: 3 additions & 0 deletions 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

0 comments on commit e5582f8

Please sign in to comment.