Skip to content

Commit 18f1a5e

Browse files
authored
Merge pull request #71 from code-hike/add-storybook-docs
Add storybook docs
2 parents 4aa8849 + 3ae9f6b commit 18f1a5e

36 files changed

+2064
-1232
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ dist
55
yarn-error.log
66
.prettierignore
77
.env
8-
.vscode
8+
.vscode
9+
storybook-static

.gitmodules

Lines changed: 0 additions & 6 deletions
This file was deleted.

contributing.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

external/new-react-website

Lines changed: 0 additions & 1 deletion
This file was deleted.

external/site

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"watch-package": "lerna run --scope @*/mini-frame --include-dependencies --parallel x -- watch",
1313
"watch-all": "lerna run --parallel x -- watch",
1414
"storybook": "lerna run --scope storybook start --stream",
15+
"docs": "lerna run build-docs --stream",
1516
"dev": "lerna run --scope react-website dev --stream",
1617
"release": "auto shipit"
1718
},

packages/mini-browser/src/use-steps.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
import React from "react"
22

33
type MiniBrowserStep = {
4+
/**
5+
* The url to display on the navigation bar.
6+
*/
47
url?: string
8+
/**
9+
* Override the url used for the iframe and "Open in new tab" button.
10+
*/
511
loadUrl?: string
6-
children?: React.ReactNode
12+
/**
13+
* Scale the content of the browser.
14+
*/
715
zoom?: number
16+
/**
17+
* Prepend the current origin to the url.
18+
*/
819
prependOrigin?: boolean
20+
/**
21+
* The content to display in the browser. If not provided, an iframe for the url will be displayed.
22+
*/
23+
children?: React.ReactNode
924
}
1025

1126
type InternalStep = {

packages/storybook/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
"private": true,
44
"version": "0.3.0-next.0",
55
"scripts": {
6-
"start": "start-storybook -c ./src",
7-
"build-storybook": "build-storybook -c ./src -o ./dist"
6+
"start": "start-storybook -c ./src -s ./public",
7+
"build-storybook": "build-storybook -c ./src -s ./public -o ./dist",
8+
"build-docs": "build-storybook -c ./src -s ./public --docs"
89
},
910
"dependencies": {
1011
"@code-hike/code-diff": "0.3.0-next.0",
@@ -17,16 +18,16 @@
1718
"@code-hike/sim-user": "0.3.0-next.0",
1819
"@code-hike/smooth-column": "0.3.0-next.0",
1920
"@code-hike/smooth-lines": "0.3.0-next.0",
20-
"@storybook/addon-actions": "^6.0.26",
21-
"@storybook/addon-controls": "^6.0.26",
22-
"@storybook/addon-docs": "^6.0.26",
2321
"prism-svelte": "^0.4.7",
2422
"react": "^16.9.0",
2523
"react-dom": "^16.9.0"
2624
},
2725
"devDependencies": {
2826
"@babel/core": "^7.4.5",
29-
"@storybook/react": "^6.0.26",
27+
"@storybook/addon-essentials": "^6.3.0",
28+
"@storybook/addons": "^6.3.2",
29+
"@storybook/react": "^6.3.0",
30+
"@storybook/theming": "^6.3.2",
3031
"babel-loader": "^8.0.6",
3132
"chromatic": "^5.9.2"
3233
}
35 KB
Loading
1.18 KB
Loading

0 commit comments

Comments
 (0)