Skip to content

Commit ce286d1

Browse files
committed
Merge branch 'ui-demo' of https://github.com/aeagle/react-spaces into ui-demo
2 parents a3c744e + b5a9f5f commit ce286d1

File tree

3 files changed

+52
-30
lines changed

3 files changed

+52
-30
lines changed

demo/src/App.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ pre {
5959
display: none;
6060
}
6161

62+
.ant-menu {
63+
.ant-menu-item {
64+
font-size: 16px !important;
65+
}
66+
}
67+
6268
.ant-anchor-link {
6369
line-height: 1.5;
6470
}

demo/src/docs/Docs.tsx

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import * as Space from 'react-spaces';
3-
import { Anchor, Button, Icon } from 'antd';
3+
import { Button, Icon, Menu } from 'antd';
44
import 'antd/dist/antd.css';
55
import { GettingStarted } from './GettingStarted';
66
import { Types } from './Types';
@@ -12,6 +12,7 @@ import { Stacked } from './Stacked';
1212
import { SizingInfo } from './SizingInfo';
1313
import { VersionHistory } from './VersionHistory';
1414
import { Intro } from './Intro';
15+
import { Try } from './Try';
1516

1617
export const Docs = () => {
1718
return (
@@ -22,42 +23,46 @@ export const Docs = () => {
2223
</Space.CenteredVertically>
2324
</Space.Top>
2425
<Space.Fill className="all-content">
25-
<Space.Left className="sidebar" scrollable={true} size={250} style={{ padding: 30, borderRight: '2px solid #ddd' }}>
26+
<Space.Left className="sidebar" scrollable={true} size={250} style={{ paddingTop: 15, borderRight: '2px solid #ddd' }}>
2627

27-
<h3 className="sidebar-header">GitHub</h3>
28-
<div style={{ marginBottom: 15 }}>
29-
<Button type="primary" onClick={() => window.location.href = 'https://github.com/aeagle/react-spaces'}><Icon type="github" /> View on GitHub</Button>
30-
</div>
31-
32-
<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>
28+
<Menu>
29+
<Menu.Item><a href="#getting-started">Getting started</a></Menu.Item>
30+
<Menu.Item><a href="#types">Types</a></Menu.Item>
31+
<Menu.Item><a href="#non-resizable">Anchored</a></Menu.Item>
32+
<Menu.Item><a href="#resizable">Resizable</a></Menu.Item>
33+
<Menu.Item><a href="#nested">Nested</a></Menu.Item>
34+
<Menu.Item><a href="#scrollable">Scrollable</a></Menu.Item>
35+
<Menu.Item><a href="#stacked">Stacked</a></Menu.Item>
36+
<Menu.Item><a href="#sizeinfo">Sizing information</a></Menu.Item>
37+
<Menu.Item><a href="#try">Try</a></Menu.Item>
38+
<Menu.Item><a href="#changes">Version history</a></Menu.Item>
39+
</Menu>
3340

34-
<Anchor offsetTop={30}>
35-
<Anchor.Link href="#getting-started" title="Getting started" />
36-
<Anchor.Link href="#types" title="Types" />
37-
<Anchor.Link href="#non-resizable" title="Anchored" />
38-
<Anchor.Link href="#resizable" title="Resizable" />
39-
<Anchor.Link href="#nested" title="Nested" />
40-
<Anchor.Link href="#scrollable" title="Scrollable" />
41-
<Anchor.Link href="#stacked" title="Stacked" />
42-
<Anchor.Link href="#sizeinfo" title="Sizing information" />
43-
<Anchor.Link href="#changes" title="Version history" />
44-
</Anchor>
41+
<div style={{ padding: 15}}>
42+
<h3 className="sidebar-header">GitHub</h3>
43+
<div style={{ marginBottom: 15 }}>
44+
<Button type="primary" onClick={() => window.location.href = 'https://github.com/aeagle/react-spaces'}><Icon type="github" /> View on GitHub</Button>
45+
</div>
4546

46-
<h2 className="sidebar-header"><a style={{ color: 'black', fontSize: 24 }} href="https://twitter.com/allaneagle">@allaneagle</a></h2>
47+
<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>
48+
49+
<h2 className="sidebar-header"><a style={{ color: 'black', fontSize: 18 }} href="https://twitter.com/allaneagle">@allaneagle</a></h2>
50+
</div>
4751

4852
</Space.Left>
4953
<Space.Fill className="main" scrollable={true} style={{ padding: 30, paddingTop: 0 }}>
5054

51-
<Intro />
52-
<GettingStarted />
53-
<Types />
54-
<Anchored />
55-
<Resizable />
56-
<Nested />
57-
<Scrollable />
58-
<Stacked />
59-
<SizingInfo />
60-
<VersionHistory />
55+
<Intro />
56+
<GettingStarted />
57+
<Types />
58+
<Anchored />
59+
<Resizable />
60+
<Nested />
61+
<Scrollable />
62+
<Stacked />
63+
<SizingInfo />
64+
<Try />
65+
<VersionHistory />
6166

6267
</Space.Fill>
6368

demo/src/docs/Try.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import * as React from 'react';
2+
3+
export const Try: React.FC = () => {
4+
return (
5+
<>
6+
<h2 id="try">Try for yourself</h2>
7+
8+
<iframe src="https://codesandbox.io/embed/react-shapes-ml4kl?fontsize=14" title="react-shapes" allow="geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media" style={{ width:'100%', maxWidth: 1000, height: 500, border: 0, borderRadius: 4, overflow: 'hidden' }} sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"></iframe>
9+
</>
10+
)
11+
}

0 commit comments

Comments
 (0)