File tree Expand file tree Collapse file tree 10 files changed +114
-66
lines changed Expand file tree Collapse file tree 10 files changed +114
-66
lines changed Original file line number Diff line number Diff line change 22 "name" : " website" ,
33 "version" : " 0.0.0" ,
44 "dependencies" : {
5+ "@atlaskit/css-reset" : " ^3.0.6" ,
56 "bolt" : " ^0.22.6" ,
67 "css-loader" : " ^2.1.1" ,
78 "extract-react-types" : " ^0.16.0" ,
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import ReactDOM from 'react-dom' ;
3- import ReactMarkdown from 'react-markdown ' ;
4- import { HashRouter as Router , Route , Link } from 'react-router-dom ';
3+ import { BrowserRouter as Router , Route } from 'react-router-dom ' ;
4+ import '@atlaskit/css-reset ';
55
6- import docs from '../DOCS' ;
76import Header from './components/Header' ;
87import Home from './pages/home' ;
98import PackageDoc from './pages/PackageDoc' ;
Original file line number Diff line number Diff line change @@ -4,8 +4,20 @@ import './style.css';
44
55export default ( ) => (
66 < nav >
7- < Link to = "/" > Home</ Link >
8- < Link to = "/packages" > Packages</ Link >
9- < Link to = "/repl" > Try it out</ Link >
7+ < div className = "side-bar" >
8+ < h1 > Pretty proptypes</ h1 >
9+ < div className = "header-controls" >
10+ < label >
11+ Type system:
12+ < select >
13+ < option value = "flow" > Flow</ option >
14+ < option value = "typescript" > TypeScript</ option >
15+ </ select >
16+ </ label >
17+ < Link to = "/" > Home</ Link >
18+ < Link to = "/packages" > Packages</ Link >
19+ < Link to = "/repl" > Try it out</ Link >
20+ </ div >
21+ </ div >
1022 </ nav >
1123) ;
Original file line number Diff line number Diff line change 1+ .side-bar {
2+ background : linear-gradient (270deg , # 6738ff, # c3ffbf );
3+ color : # 6554c0 ;
4+ padding : 15px ;
5+ display : flex;
6+ align-items : center;
7+ justify-content : space-between;
8+ height : 50px ;
9+ }
10+
11+ .side-bar h1 {
12+ display : inline-block;
13+ text-shadow : 7px 6px 20px # 6a4fc6 ;
14+ margin : 5px ;
15+ }
16+
17+ .side-bar .header-controls {
18+ color : # c0feba ;
19+ }
20+
21+ .side-bar .header-controls select {
22+ margin-left : 10px ;
23+ }
Original file line number Diff line number Diff line change 1717 height : 100% ;
1818 }
1919
20- .side-bar {
21- background : linear-gradient (270deg , # 6738ff, # c3ffbf );
22- color : # 6554c0 ;
23- padding : 15px ;
24- display : flex;
25- align-items : center;
26- justify-content : space-between;
27- height : 50px ;
28- }
29-
30- .side-bar h1 {
31- display : inline-block;
32- text-shadow : 7px 6px 20px # 6a4fc6 ;
33- margin : 5px ;
34- }
35-
36- .side-bar .header-controls {
37- color : # c0feba ;
38- }
39-
40- .side-bar .header-controls select {
41- margin-left : 10px ;
42- }
20+
4321
4422 .error-container {
4523 position : absolute;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { Link } from 'react-router-dom' ;
3+ import ReactMarkdown from 'react-markdown' ;
4+ import docs from '../../../DOCS' ;
5+ import './style.css' ;
6+
7+ export default function PackageDoc ( { location } ) {
8+ let params = new URLSearchParams ( location . search ) ;
9+ let docName = params . get ( 'package' ) ;
10+ return (
11+ < main >
12+ < sidebar >
13+ < ul >
14+ { Object . keys ( docs ) . map ( docTitle => (
15+ < li className = { docName && docName === docTitle ? 'active' : '' } >
16+ < Link to = { { pathname : '/packages' , search : `package=${ docTitle } ` } } > { docTitle } </ Link >
17+ </ li >
18+ ) ) }
19+ </ ul >
20+ </ sidebar >
21+ < article >
22+ < ReactMarkdown source = { docs [ docName || Object . keys ( docs ) [ 0 ] ] } />
23+ </ article >
24+ </ main >
25+ ) ;
26+ }
Original file line number Diff line number Diff line change 1+ main {
2+ display : flex;
3+ }
4+ article {
5+ margin-left : 20px ;
6+ padding : 0 20px ;
7+ border-left : 1px solid # ededed ;
8+ }
9+
10+ sidebar ul {
11+ list-style : none;
12+ font-size : 1.5em ;
13+ }
14+
15+ sidebar ul li a {
16+ color : # 102b4f ;
17+ }
18+
19+ sidebar ul li .active a {
20+ font-weight : 500 ;
21+ }
Original file line number Diff line number Diff line change @@ -56,18 +56,6 @@ class App extends Component {
5656 const { code, dataForPropTypes, error } = this . state ;
5757 return (
5858 < Fragment >
59- < div className = "side-bar" >
60- < h1 > Pretty proptypes</ h1 >
61- < div className = "header-controls" >
62- < label >
63- Type system:
64- < select onChange = { this . handleSelectChange } >
65- < option value = "flow" > Flow</ option >
66- < option value = "typescript" > TypeScript</ option >
67- </ select >
68- </ label >
69- </ div >
70- </ div >
7159 < div className = "container" >
7260 < div className = "block" >
7361 < CodeMirror
Original file line number Diff line number Diff line change @@ -2074,6 +2074,10 @@ core-js@^2.4.0, core-js@^2.5.0:
20742074 version "2.6.5"
20752075 resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895"
20762076
2077+ core-js@^2.4.1 :
2078+ version "2.6.5"
2079+ resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895"
2080+
20772081core-util-is@1.0.2, core-util-is@~1.0.0 :
20782082 version "1.0.2"
20792083 resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
@@ -2905,6 +2909,10 @@ execa@^1.0.0:
29052909 signal-exit "^3.0.0"
29062910 strip-eof "^1.0.0"
29072911
2912+ exenv@^1.2.2 :
2913+ version "1.2.2"
2914+ resolved "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d"
2915+
29082916exit@^0.1.2 :
29092917 version "0.1.2"
29102918 resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
@@ -3058,6 +3066,10 @@ fb-watchman@^2.0.0:
30583066 dependencies :
30593067 bser "^2.0.0"
30603068
3069+ fbjs-css-vars@^1.0.0 :
3070+ version "1.0.2"
3071+ resolved "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz#216551136ae02fe255932c3ec8775f18e2c078b8"
3072+
30613073fbjs@^0.8.0, fbjs@^0.8.9 :
30623074 version "0.8.17"
30633075 resolved "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd"
@@ -3070,6 +3082,19 @@ fbjs@^0.8.0, fbjs@^0.8.9:
30703082 setimmediate "^1.0.5"
30713083 ua-parser-js "^0.7.18"
30723084
3085+ fbjs@^1.0.0 :
3086+ version "1.0.0"
3087+ resolved "https://registry.npmjs.org/fbjs/-/fbjs-1.0.0.tgz#52c215e0883a3c86af2a7a776ed51525ae8e0a5a"
3088+ dependencies :
3089+ core-js "^2.4.1"
3090+ fbjs-css-vars "^1.0.0"
3091+ isomorphic-fetch "^2.1.1"
3092+ loose-envify "^1.0.0"
3093+ object-assign "^4.1.0"
3094+ promise "^7.1.1"
3095+ setimmediate "^1.0.5"
3096+ ua-parser-js "^0.7.18"
3097+
30733098figgy-pudding@^3.5.1 :
30743099 version "3.5.1"
30753100 resolved "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790"
You can’t perform that action at this time.
0 commit comments