Skip to content

Commit

Permalink
docs: show readme as storybook home
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjavi committed Oct 19, 2024
1 parent 8369d45 commit 5db739c
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .storybook/home.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Markdown, Meta } from '@storybook/blocks'
import README from '../README.md?raw'

<Meta title="About/README" />

<Markdown>{README}</Markdown>
12 changes: 11 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
import type { StorybookConfig } from '@storybook/react-vite'

const config: StorybookConfig = {
stories: ['../stories/**/*.@(mdx)', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
stories: ['./home.mdx', '../stories/**/*.@(mdx)', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-themes',
{
name: '@storybook/addon-docs',
options: {
csfPluginOptions: null,
mdxPluginOptions: {},
},
},
],
docs: {
defaultName: 'docs',
},
framework: {
name: '@storybook/react-vite',
options: {},
Expand Down
2 changes: 1 addition & 1 deletion .storybook/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { create } from '@storybook/theming/create'
// @see https://storybook.js.org/docs/configure/user-interface/theming#create-a-theme-quickstart
export default create({
base: 'dark',
brandTitle: 'Glassmorphic shadcn/ui',
brandTitle: 'glasscn-ui',
brandUrl: 'https://github.com/itsjavi/glasscn-ui',
brandTarget: '_blank',
brandImage: undefined, //url
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# glasscn-ui

![GitHub](https://img.shields.io/github/stars/itsjavi/glasscn-ui?style=flat-square&label=GitHub&logo=github)
![NPM](https://img.shields.io/npm/v/glasscn-ui)
![License](https://img.shields.io/github/license/itsjavi/glasscn-ui?label=License)

Themable shadcn/ui component library with glassmorphism variants, and extra components like the Circular Progress.

Expand Down
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
},
"devDependencies": {
"@commitlint/config-conventional": "^19.5.0",
"@storybook/addon-docs": "^8.3.6",
"@storybook/addon-essentials": "^8.3.6",
"@storybook/addon-interactions": "^8.3.6",
"@storybook/addon-links": "^8.3.6",
Expand Down Expand Up @@ -120,11 +121,5 @@
"packageManager": "[email protected]",
"publishConfig": {
"access": "public"
},
"overrides": {
"@types/react": "^18",
"@types/react-dom": "^18",
"react": "^18",
"react-dom": "^18"
}
}
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5db739c

Please sign in to comment.