Skip to content

Commit f345fcf

Browse files
author
Savina Shen (Manpower Services Taiwan Co Ltd)
committed
Merge branch 'storybook' into dev
Merge changes made for deployment
2 parents b045326 + 8fc8f8f commit f345fcf

File tree

5 files changed

+42
-12
lines changed

5 files changed

+42
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy Storybook to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- storybook
7+
8+
permissions:
9+
contents: write
10+
pages: write
11+
12+
jobs:
13+
build-and-deploy:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '20.16.0'
24+
25+
- name: Install dependencies
26+
run: npm install
27+
28+
- name: Build Storybook
29+
env:
30+
STORYBOOK_AZURE_MAPS_KEY: ${{ secrets.STORYBOOK_AZURE_MAPS_KEY }}
31+
run: npm run build-storybook
32+
33+
- name: Deploy to GitHub Pages
34+
uses: peaceiris/actions-gh-pages@v3
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
publish_dir: ./storybook-static

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ const config: StorybookConfig = {
2626
name: '@storybook/react-webpack5',
2727
options: {},
2828
},
29-
staticDirs: ['..\\public'],
29+
staticDirs: ['../public'],
3030
};
3131
export default config;

src/stories/BasicUsage/MapControls/MapControl.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ import {
7777
{
7878
controlName: 'CompassControl',
7979
controlOptions: { rotationDegreesDelta: 10, style: 'dark' },
80-
options: { position: 'top-left' } as ControlOptions,
80+
options: { position: 'bottom-right' } as ControlOptions,
8181
},
8282
]}
8383
/>
@@ -129,7 +129,7 @@ import {
129129
{
130130
controlName: 'TrafficControl',
131131
controlOptions: { incidents: true },
132-
options: { position: 'top-right' } as ControlOptions,
132+
options: { position: 'top-left' } as ControlOptions,
133133
},
134134
{
135135
controlName: 'TrafficLegendControl',

src/stories/DataVisualization/Datavisualization.mdx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
import { Meta, Source } from '@storybook/blocks';
2-
import BubbleLayer from './BubbleLayer/BubbleLayer';
3-
import * as BubbleLayerStories from './BubbleLayer/BubbleLayer.stories';
2+
import ClusterAggregates from './ClusterAggregates/ClusterAggregates'
43

54
<Meta title="Data Visualization/Introduction"/>
65

7-
86
# Data Visualization
97
**react-azure-maps** provides a set of components to help you visualize data on a map like this: <br/>
108

11-
{/* <BubbleLayer/> */}
12-
13-
<Canvas of={BubbleLayerStories.Example} sourceState="none" />
14-
9+
<ClusterAggregates showBubbles showNumbers/>
1510

1611
We will need 2 kinds of components to visualize data on a map:
1712
1. `<AzureMapDataSourceProvider>` : to provide your data to the map.

src/stories/DataVisualization/PolygonLayer/PolygonLayer.stories.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ const PolygonLayer = () => {
3636
</AzureMapsProvider>
3737
);
3838
};
39-
40-
export default PolygonLayer;
4139
`,
4240
},
4341
},

0 commit comments

Comments
 (0)