-
Notifications
You must be signed in to change notification settings - Fork 715
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new(vx-demo): convert ZoomI to codesandbox
- Loading branch information
1 parent
abfca4f
commit 22b5fd5
Showing
6 changed files
with
69 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
import { render } from 'react-dom'; | ||
import ParentSize from '@vx/responsive/lib/components/ParentSize'; | ||
|
||
import Example from './Example'; | ||
import './sandbox-styles.css'; | ||
|
||
render( | ||
<ParentSize>{({ width, height }) => <Example width={width} height={height} />}</ParentSize>, | ||
document.getElementById('root'), | ||
); |
28 changes: 28 additions & 0 deletions
28
packages/vx-demo/src/docs-v2/examples/vx-zoom-i/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "@vx/demo-zoom-i", | ||
"description": "Standalone vx zoom demo.", | ||
"main": "index.tsx", | ||
"dependencies": { | ||
"@babel/runtime": "^7.8.4", | ||
"@types/react": "^16", | ||
"@types/react-dom": "^16", | ||
"@vx/clip-path": "latest", | ||
"@vx/event": "latest", | ||
"@vx/mock-data": "latest", | ||
"@vx/responsive": "latest", | ||
"@vx/scale": "latest", | ||
"@vx/zoom": "latest", | ||
"d3-scale-chromatic": "^1.5.0", | ||
"react": "^16.8", | ||
"react-dom": "^16.8", | ||
"react-scripts-ts": "3.1.0", | ||
"typescript": "^3" | ||
}, | ||
"keywords": [ | ||
"visualization", | ||
"d3", | ||
"react", | ||
"vx", | ||
"zoom" | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
packages/vx-demo/src/docs-v2/examples/vx-zoom-i/sandbox-styles.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
html, | ||
body, | ||
#root { | ||
height: 100%; | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, | ||
'Open Sans', 'Helvetica Neue', sans-serif; | ||
line-height: 2em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
import React from 'react'; | ||
import Show from '../components/Show'; | ||
import ZoomI from '../components/tiles/Zoom-i'; | ||
import ZoomISource from '!!raw-loader!../components/tiles/Zoom-i'; | ||
import ZoomI from '../docs-v2/examples/vx-zoom-i/Example'; | ||
import ZoomISource from '!!raw-loader!../docs-v2/examples/vx-zoom-i/Example'; | ||
|
||
export default () => { | ||
return ( | ||
<Show component={ZoomI} title="Zoom I"> | ||
{ZoomISource} | ||
</Show> | ||
); | ||
}; | ||
export default () => ( | ||
<Show component={ZoomI} title="Zoom I" codeSandboxDirectoryName="vx-zoom-i"> | ||
{ZoomISource} | ||
</Show> | ||
); |