Skip to content

Commit

Permalink
added storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
scratchuz4k committed Jun 10, 2024
1 parent 7cb4717 commit 8a33600
Show file tree
Hide file tree
Showing 13 changed files with 12,483 additions and 1,397 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/deploy-storybook-github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build and Publish storybook to GitHub Pages

on:
push:
branches:
- "master"

permissions:
contents: read
pages: write
id-token: write

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.build-publish.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- id: build-publish
uses: bitovi/github-actions-storybook-to-github-pages@upgrade-child-actions
with:
path: storybook-static
# want a separate workflow, required prod build to generate type definition
build_command: npm run build && npm run build-storybook
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ coverage
*.sw?

*.tsbuildinfo

*storybook.log
15 changes: 15 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/** @type { import('@storybook/vue3-vite').StorybookConfig } */
const config = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/vue3-vite",
options: {},
},
};
export default config;
15 changes: 15 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/** @type { import('@storybook/vue3').Preview } */
import '@/assets/style.scss'

const preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const items = [
children: [
{
component: 'column',
children: [{ configs: { title: 'Nome Completo' }, component: 'input-text',}
children: [{ configs: { label: 'Nome Completo' }, component: 'input',}
]
},

Expand All @@ -60,12 +60,12 @@ const items = [
children: [
{
component: 'column',
children: [{ configs: { title: 'Username' }, component: 'input-text',}
children: [{ configs: { label: 'Username' }, component: 'input',}
]
},
{
component: 'column',
children: [ { configs: { title: 'Password' }, component: 'input-text',}
children: [ { configs: { label: 'Password' }, component: 'input',}
]
}

Expand Down
Loading

0 comments on commit 8a33600

Please sign in to comment.