-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
61 additions
and
49 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
packages/react-docs/pages/components/space/horizontal-spacing.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Button, Icon, Space } from '@tonic-ui/react'; | ||
import React from 'react'; | ||
|
||
const App = () => ( | ||
<> | ||
<Button variant="ghost" width="8x" height="8x" borderRadius="circle"> | ||
<Icon icon="add" /> | ||
</Button> | ||
<Space width="2x" /> | ||
<Button variant="ghost" borderRadius="2rem"> | ||
<Icon icon="settings" /> | ||
<Space width="2x" /> | ||
Settings | ||
</Button> | ||
</> | ||
); | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Space | ||
|
||
Space is [Box](box) with `display="inline-flex"`. You can specify either `width` or `height` to add space between two elements. | ||
|
||
## Import | ||
|
||
```js | ||
import { Space } from '@tonic-ui/react'; | ||
``` | ||
|
||
## Usage | ||
|
||
### Horizontal spacing | ||
|
||
{render('./horizontal-spacing')} | ||
|
||
### Vertical spacing | ||
|
||
{render('./vertical-spacing')} | ||
|
||
## Props | ||
|
||
### Space | ||
|
||
| Name | Type | Default | Description | | ||
| :--- | :--- | :------ | :---------- | | ||
| children | ReactNode | | | | ||
| height | number \| string | | | | ||
| width | number \| string | | | |
14 changes: 14 additions & 0 deletions
14
packages/react-docs/pages/components/space/vertical-spacing.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Flex, Input, Space, Text, TextLabel } from '@tonic-ui/react'; | ||
import React from 'react'; | ||
|
||
const App = () => ( | ||
<Flex flexDirection="column"> | ||
<TextLabel>Text label</TextLabel> | ||
<Space height="2x" /> | ||
<Input placeholder="Text input" /> | ||
<Space height="1x" /> | ||
<Text size="xs">Help text for the text input</Text> | ||
</Flex> | ||
); | ||
|
||
export default App; |