11import React from 'react' ;
22import * as Space from 'react-spaces' ;
3- import { Tabs , Anchor , Divider , Button , Icon } from 'antd' ;
3+ import { Tabs , Anchor , Button , Icon } from 'antd' ;
44import 'antd/dist/antd.css' ;
55import SyntaxHighlighter from 'react-syntax-highlighter' ;
66import './App.scss' ;
7+ import ReactGA from 'react-ga' ;
8+
9+ ReactGA . initialize ( "UA-144490437-1" ) ;
10+ ReactGA . pageview ( window . location . pathname + window . location . search ) ;
711
812const Description = ( props : string ) => (
913 < Space . Centered >
@@ -30,13 +34,7 @@ const App: React.FC = () => {
3034 < Button type = "primary" onClick = { ( ) => window . location . href = 'https://github.com/aeagle/react-spaces' } > < Icon type = "github" /> View on GitHub</ Button >
3135 </ div >
3236
33- < h3 className = "sidebar-header" > NPM < img alt = "NPM version" src = "https://img.shields.io/npm/v/react-spaces.svg" /> </ h3 >
34- < div style = { { marginBottom : 15 } } >
35- < Button type = "primary" onClick = { ( ) => window . location . href = 'https://www.npmjs.com/package/react-spaces' } > View on NPM</ Button >
36- </ div >
37-
38- Maintained by
39- < h2 className = "sidebar-header" > < a style = { { color : 'black' , fontSize : 24 } } href = "https://twitter.com/allaneagle" > @allaneagle</ a > </ h2 >
37+ < h3 className = "sidebar-header" > NPM < img style = { { position : 'relative' , top : - 2 } } alt = "NPM version" src = "https://img.shields.io/npm/v/react-spaces.svg" /> </ h3 >
4038
4139 < Anchor offsetTop = { 30 } >
4240 < Anchor . Link href = "#getting-started" title = "Getting started" />
@@ -50,6 +48,8 @@ const App: React.FC = () => {
5048 < Anchor . Link href = "#changes" title = "Version history" />
5149 </ Anchor >
5250
51+ < h2 className = "sidebar-header" > < a style = { { color : 'black' , fontSize : 24 } } href = "https://twitter.com/allaneagle" > @allaneagle</ a > </ h2 >
52+
5353 </ Space . Left >
5454 < Space . Fill scrollable = { true } style = { { padding : 30 , paddingTop : 0 } } className = "examples" >
5555
@@ -78,12 +78,12 @@ const App: React.FC = () => {
7878
7979 < ul >
8080 < li >
81- < strong > ViewPort</ strong > - a top level space. This space will take over the
81+ < strong > < ViewPort /> </ strong > a top level space. This space will take over the
8282 full viewport of the browser window. Resizing the browser window will automatically
8383 adjust the size of this space and all the nested spaces.
8484 </ li >
8585 < li >
86- < strong > Fixed</ strong > - this space can be given a height and optionally
86+ < strong > < Fixed /> </ strong > - this space can be given a height and optionally
8787 a width (by default it will size to 100% of it's container). All nested spaces will be
8888 contained within this fixed size space.
8989 </ li >
@@ -97,27 +97,27 @@ const App: React.FC = () => {
9797
9898 < ul >
9999 < li >
100- < strong > Left</ strong > - a space anchored to the left of the parent
100+ < strong > < Left /> </ strong > a space anchored to the left of the parent
101101 container/space. A size can be specified in pixels to determine its width.
102102 </ li >
103103 < li >
104- < strong > Right</ strong > - a space anchored to the right of the parent
104+ < strong > < Right /> </ strong > a space anchored to the right of the parent
105105 container/space. A size can be specified in pixels to determine its width.
106106 </ li >
107107 < li >
108- < strong > Top</ strong > - a space anchored to the top of the parent
108+ < strong > < Top /> </ strong > a space anchored to the top of the parent
109109 container/space. A size can be specified in pixels to determine its height.
110110 </ li >
111111 < li >
112- < strong > Bottom</ strong > - a space anchored to the bottom of the parent
112+ < strong > < Bottom /> </ strong > a space anchored to the bottom of the parent
113113 container/space. A size can be specified in pixels to determine its height.
114114 </ li >
115115 </ ul >
116116 </ Tabs . TabPane >
117117 < Tabs . TabPane tab = "Other" key = "3" >
118118 < ul >
119119 < li >
120- < strong > Fill</ strong > - a space which consumes any available area left in the
120+ < strong > < Fill /> </ strong > a space which consumes any available area left in the
121121 parent container/space taking into account any anchored spaces on every side.
122122 </ li >
123123 </ ul >
@@ -146,7 +146,7 @@ const App: React.FC = () => {
146146 </ SyntaxHighlighter >
147147
148148 < Space . Fixed height = { 400 } >
149- < Space . Left size = { 200 } style = { { backgroundColor : '#e0eee0 ' } } >
149+ < Space . Left size = { 100 } style = { { backgroundColor : '#e0eae0 ' } } >
150150 { Description ( "Left" ) }
151151 </ Space . Left >
152152 < Space . Fill style = { { backgroundColor : '#eee0e0' } } >
@@ -392,31 +392,31 @@ const App: React.FC = () => {
392392 {
393393 "const App = () => (\r\n" +
394394 " <Space.Fixed height={400}>\r\n" +
395- " <Space.LeftResizable size={200 } order={1} />\r\n" +
396- " <Space.LeftResizable size={125 } order={2} />\r\n" +
395+ " <Space.LeftResizable size={100 } order={1} />\r\n" +
396+ " <Space.LeftResizable size={100 } order={2} />\r\n" +
397397 " <Space.Fill />\r\n" +
398- " <Space.RightResizable size={125 } order={2} />\r\n" +
399- " <Space.RightResizable size={200 } order={1} />\r\n" +
398+ " <Space.RightResizable size={100 } order={2} />\r\n" +
399+ " <Space.RightResizable size={100 } order={1} />\r\n" +
400400 " </Space.Fixed>\r\n" +
401401 ")"
402402 }
403403 </ SyntaxHighlighter >
404404
405405 < Space . Fixed height = { 400 } >
406- < Space . LeftResizable trackSize = { true } size = { 200 } order = { 1 } style = { { backgroundColor : '#e0eee0' } } >
407- { Description ( "Left resizable 1" ) }
406+ < Space . LeftResizable trackSize = { true } size = { 100 } order = { 1 } style = { { backgroundColor : '#e0eee0' } } >
407+ { Description ( "Left 1" ) }
408408 </ Space . LeftResizable >
409- < Space . LeftResizable trackSize = { true } size = { 125 } order = { 2 } style = { { backgroundColor : '#e0eeee' } } >
410- { Description ( "Left resizable 2" ) }
409+ < Space . LeftResizable trackSize = { true } size = { 100 } order = { 2 } style = { { backgroundColor : '#e0eeee' } } >
410+ { Description ( "Left 2" ) }
411411 </ Space . LeftResizable >
412412 < Space . Fill trackSize = { true } style = { { backgroundColor : '#eee0e0' } } >
413413 { Description ( "Fill" ) }
414414 </ Space . Fill >
415- < Space . RightResizable trackSize = { true } size = { 125 } order = { 2 } style = { { backgroundColor : '#e0eeee' } } >
416- { Description ( "Right resizable 2" ) }
415+ < Space . RightResizable trackSize = { true } size = { 100 } order = { 2 } style = { { backgroundColor : '#e0eeee' } } >
416+ { Description ( "Right 2" ) }
417417 </ Space . RightResizable >
418- < Space . RightResizable trackSize = { true } size = { 200 } order = { 1 } style = { { backgroundColor : '#e0eee0' } } >
419- { Description ( "Right resizable 1" ) }
418+ < Space . RightResizable trackSize = { true } size = { 100 } order = { 1 } style = { { backgroundColor : '#e0eee0' } } >
419+ { Description ( "Right 1" ) }
420420 </ Space . RightResizable >
421421 </ Space . Fixed >
422422
0 commit comments