Skip to content

Commit 6eef75e

Browse files
committed
Add images for flex, grid, horizontal stack, vertical stack, text box, toggle button group
1 parent ee946a0 commit 6eef75e

File tree

7 files changed

+34
-16
lines changed

7 files changed

+34
-16
lines changed

README.md

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ A [React renderer](https://legacy.reactjs.org/docs/codebase-overview.html#render
88

99
## Introduction
1010

11-
1211
> 🚧 This project is still under development. Any API may change as needed.
1312
1413
React Node InSim is a [React renderer](https://legacy.reactjs.org/docs/codebase-overview.html#renderers) for [Live for Speed](https://www.lfs.net/) [InSim](https://en.lfsmanual.net/wiki/InSim.txt) buttons. It also provides [layout components](#horizontal-stack) for easier button positioning, [hooks](#hooks) for handling incoming InSim packets and tracking server connections & players.
@@ -394,11 +393,13 @@ import { HStack } from 'react-node-insim';
394393

395394
### Usage
396395

396+
<img src="docs/horizontal-stack.png" alt="Horizontal stack" />
397+
397398
```tsx
398399
<HStack top={10} left={20} width={7} height={4} variant="dark">
399400
<Button>Stacked button</Button>
400-
<Button color="title">Button with custom color</Button>
401-
<Button height={10}>Button with custom height</Button>
401+
<Button color="title">Custom color</Button>
402+
<Button height={6}>Custom height</Button>
402403
</HStack>
403404
```
404405

@@ -414,11 +415,13 @@ import { VStack } from 'react-node-insim';
414415

415416
### Usage
416417

418+
<img src="docs/vertical-stack.png" alt="Vertical stack" />
419+
417420
```tsx
418421
<VStack top={10} left={20} width={7} height={4} variant="dark">
419422
<Button>Stacked button</Button>
420-
<Button color="title">Button with custom color</Button>
421-
<Button height={10}>Button with custom height</Button>
423+
<Button color="title">Custom color</Button>
424+
<Button height={6}>Custom height</Button>
422425
</VStack>
423426
```
424427

@@ -434,14 +437,18 @@ import { Flex } from 'react-node-insim';
434437

435438
### Usage
436439

440+
<img src="docs/flex.png" alt="Flex" />
441+
437442
```tsx
438443
<Flex
439444
top={10}
440445
left={20}
441-
width={30}
442-
height={20}
446+
width={36}
447+
height={16}
443448
alignItems="center"
444-
justifyContent="space-between"
449+
justifyContent="space-evenly"
450+
background="dark"
451+
backgroundColor="light"
445452
>
446453
<Button width={8} height={4}>
447454
Left
@@ -467,10 +474,12 @@ import { Grid, GridButton } from 'react-node-insim';
467474

468475
### Usage
469476

477+
<img src="docs/grid.png" alt="Grid" />
478+
470479
```tsx
471480
<Grid
472-
top={5}
473-
left={10}
481+
top={30}
482+
left={40}
474483
width={30}
475484
height={30}
476485
background="dark"
@@ -479,7 +488,6 @@ import { Grid, GridButton } from 'react-node-insim';
479488
gridTemplateRows="1fr 3fr 2fr"
480489
gridColumnGap={1}
481490
gridRowGap={1}
482-
variant="dark"
483491
>
484492
<GridButton>1</GridButton>
485493
<GridButton
@@ -493,12 +501,18 @@ import { Grid, GridButton } from 'react-node-insim';
493501
</GridButton>
494502
<GridButton
495503
gridColumnStart={3}
496-
gridColumnEnd={4}
504+
gridColumnEnd={3}
497505
gridRowStart={1}
498-
gridRowEnd={4}
506+
gridRowEnd={3}
499507
>
500508
3
501509
</GridButton>
510+
<GridButton alignSelf="end" height={10}>
511+
4
512+
</GridButton>
513+
<GridButton gridColumnStart={1} gridColumnEnd={4}>
514+
5
515+
</GridButton>
502516
</Grid>
503517
```
504518

@@ -615,6 +629,8 @@ import { ToggleButtonGroup } from 'react-node-insim';
615629

616630
### Usage
617631

632+
<img src="docs/toggle-button-group.gif" alt="Toggle button group" />
633+
618634
```tsx
619635
const options = [
620636
{ label: 'low', value: 1 },
@@ -629,8 +645,8 @@ function App() {
629645
<ToggleButtonGroup
630646
top={30}
631647
left={50}
632-
width={25}
633-
height={4}
648+
width={36}
649+
height={6}
634650
options={options}
635651
selectedOption={selectedOption}
636652
onChange={setSelectedOption}
@@ -651,6 +667,8 @@ import { TextBox } from 'react-node-insim';
651667

652668
### Usage
653669

670+
<img src="docs/text-box.gif" alt="Text box" />
671+
654672
```tsx
655673
<TextBox
656674
top={40}
@@ -908,4 +926,4 @@ yarn format
908926

909927
---
910928

911-
![React Node Insim - An open source project by Sim Broadcasts](https://simbroadcasts.tv/assets/node-insim/react-node-insim-footer.png)
929+
![React Node Insim - An open source project by Sim Broadcasts](https://simbroadcasts.tv/assets/node-insim/react-node-insim-footer.png)

docs/flex.png

31.6 KB
Loading

docs/grid.png

43.1 KB
Loading

docs/horizontal-stack.png

23.6 KB
Loading

docs/text-box.gif

74.3 KB
Loading

docs/toggle-button-group.gif

61.2 KB
Loading

docs/vertical-stack.png

19.2 KB
Loading

0 commit comments

Comments
 (0)