Skip to content

Commit

Permalink
Create custom storybook theme
Browse files Browse the repository at this point in the history
  • Loading branch information
mel-miller committed Oct 5, 2022
1 parent ec99368 commit 68178ad
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from '@storybook/addons'
import themeSbDrupal from './themeSbDrupal'

addons.setConfig({
theme: themeSbDrupal,
})
10 changes: 10 additions & 0 deletions .storybook/preview-body.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,14 @@
.sbdocs-wrapper {
padding: 2rem 2.5rem;
}
.sbdocs {
color: black;
}
.os-content {
background-color: #fafcfe;
color: black;
}
.css-1p8ieni code {
background-color: #fafcfe;
}
</style>
15 changes: 15 additions & 0 deletions .storybook/themeSbDrupal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { create } from '@storybook/theming'
import { version } from '../package.json'

const toolkitTitle = `<img src="sb-drupal-logo.svg" width="150px" alt="Storybook Drupal"/> <br/> v${version}`

export default create({
base: 'light',
brandTitle: toolkitTitle,
colorPrimary: '#FF4785',
colorSecondary: '#0678be',
textColor: 'black',
textInverseColor: 'white',
barTextColor: '#3d4546',
barSelectedColor: '#0678be',
})
91 changes: 91 additions & 0 deletions public/sb-drupal-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/docs/introduction.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Meta title="Documentation/Introduction" />

# SB Drupal
# Storybook Drupal

This toolkit is a sample Storybook implementation for Drupal.

Expand Down

0 comments on commit 68178ad

Please sign in to comment.