Skip to content

Commit 806f1f6

Browse files
committed
Updated documentation
1 parent e29ffa1 commit 806f1f6

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed

demo/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
work correctly both with client-side routing and a non-root public URL.
2020
Learn how to configure a non-root public URL by running `npm run build`.
2121
-->
22-
<title>React App</title>
22+
<title>React Spaces - Divide and conquer your page</title>
2323
</head>
2424
<body>
2525
<noscript>You need to enable JavaScript to run this app.</noscript>

demo/src/App.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,13 @@ const App: React.FC = () => {
451451

452452
<h2 id="changes">Version history</h2>
453453

454+
<p>
455+
<strong>0.1.3</strong>
456+
<ul>
457+
<li>Added readme</li>
458+
<li>Updated documentation</li>
459+
</ul>
460+
</p>
454461
<p>
455462
<strong>0.1.2</strong>
456463
<ul>

react-spaces/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# React Spaces
2+
3+
React Spaces allow you to divide a page or container HTML element into spaces. These spaces know how to behave in relation to each other and can also be divided into further nested spaces.
4+
5+
### Top level spaces
6+
7+
Used at the top level of all other spaces.
8+
9+
**ViewPort**
10+
11+
This space will take over the full viewport of the browser window. Resizing the browser window will automatically adjust the size of this space and all the nested spaces.
12+
13+
**Fixed**
14+
15+
This space can be given a height and optionally a width (by default it will size to 100% of it's container). All nested spaces will be contained within this fixed size space.
16+
17+
### Inner spaces
18+
19+
These can be used within the top-level spaces **ViewPort** and **Fixed** or nested within other spaces.
20+
21+
**Left** / **Right**
22+
23+
A space anchored to the left or right of the parent container/space. A size can be specified in pixels to determine its width.
24+
25+
**Top** / **Bottom**
26+
27+
A space anchored to the top or bottom of the parent container/space. A size can be specified in pixels to determine its height.
28+
29+
**Fill**
30+
31+
A space which consumes any available area left in the parent container/space taking into account any anchored spaces on every side.
32+
33+
## Getting started
34+
35+
To get started with React Spaces you need:
36+
37+
```typescript
38+
npm i react-spaces
39+
```
40+
41+
```typescript
42+
import * as Spaces from 'react-spaces';
43+
```
44+
45+
View full documentation here:
46+
[View examples here](http://www.allaneagle.com/react-spaces/demo/)

0 commit comments

Comments
 (0)