Skip to content

Commit

Permalink
Merge pull request #199 from brainstormforce/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
vrundakansara authored Nov 25, 2024
2 parents 3dbf8ea + 3ae42b3 commit bcff2a5
Show file tree
Hide file tree
Showing 11 changed files with 202 additions and 203 deletions.
66 changes: 33 additions & 33 deletions .github/workflows/storybook-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
# Workflow name
name: Build and Publish Storybook to GitHub Pages

on:
# Event for the workflow to run on
push:
branches:
- master
# Event for the workflow to run on
push:
branches:
- master

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

# List of jobs
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.build-publish.outputs.page_url }}
runs-on: ubuntu-latest
# Job steps
steps:
# Manual Checkout
- uses: actions/checkout@v4
# Set up Node
- uses: actions/setup-node@v4
with:
node-version: '20.x'
#👇 Add Storybook build and deploy to GitHub Pages as a step in the workflow
- id: build-publish
uses: bitovi/[email protected]
with:
install_command: npm install # default: npm ci
build_command: npm run build && npm run build-storybook # default: npm run build-storybook
path: storybook-static # default: dist/storybook
checkout: false # default: true
deploy:
environment:
name: github-pages
url: ${{ steps.build-publish.outputs.page_url }}
runs-on: ubuntu-latest
# Job steps
steps:
# Manual Checkout
- uses: actions/checkout@v4

# Set up Node
- uses: actions/setup-node@v4
with:
node-version: '20.x'

#👇 Add Storybook build and deploy to GitHub Pages as a step in the workflow
- id: build-publish
uses: bitovi/[email protected]
with:
install_command: npm install # default: npm ci
build_command: npm run build && npm run build-storybook # default: npm run build-storybook
path: storybook-static # default: dist/storybook
checkout: false # default: true
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Version 1.2.1 - 21st November, 2024
- Improvement - Added new props to the Bar Chart component for customizability.

Version 1.2.0 - 20th November, 2024
- New - Dropzone
- New - Added Unit Tests setup and a11y CI setup
Expand Down
129 changes: 0 additions & 129 deletions package-lock.json

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

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
"build-storybook": "storybook build",
"chromatic": "npx chromatic --project-token CHROMATIC_PROJECT_TOKEN",
"package": "sh bin/build.sh",
"release": "npm run build && npm run package ",
"deploy-storybook": "storybook-to-ghpages"
"release": "npm run build && npm run package "
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -85,7 +84,6 @@
"@storybook/blocks": "^8.3.5",
"@storybook/react": "^8.3.5",
"@storybook/react-vite": "^8.3.5",
"@storybook/storybook-deployer": "^2.8.16",
"@storybook/test": "^8.3.5",
"@storybook/test-runner": "^0.19.1",
"@tailwindcss/container-queries": "^0.1.1",
Expand Down
32 changes: 32 additions & 0 deletions src/components/bar-chart/bar-chart.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -567,3 +567,35 @@ export const AreaChartCard5: Story1 = ( args ) => (
);

AreaChartCard5.storyName = 'Revenue Card With Bar Chart Interactive';

export const BarChartCard6: Story = {
args: {
data: chartData,
dataKeys: [ 'desktop' ],
layout: 'horizontal',
showXAxis: true,
showYAxis: false,
showTooltip: true,
tooltipIndicator: 'dot',
showCartesianGrid: true,
tickFormatter: monthFormatter,
yAxisDataKey: 'month',
activeBar: {
fill: '#2563EB',
},
tooltipProps: {
cursor: {
fill: 'transparent',
},
},
},
render: ( args ) => (
<BarChart
{ ...args }
xAxisDataKey={ args.layout === 'vertical' ? '' : 'month' }
showCartesianGrid={ args.layout === 'vertical' ? false : true }
/>
),
};

BarChartCard6.storyName = 'Customize hover effect';
Loading

0 comments on commit bcff2a5

Please sign in to comment.