Skip to content

Commit 692a455

Browse files
authored
Merge pull request #191 from forestream/fix-docs
Fix Devup UI Docs Page
2 parents 20b11d7 + 896bc1d commit 692a455

File tree

19 files changed

+2423
-907
lines changed

19 files changed

+2423
-907
lines changed
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const metadata = {
2-
title: "Box",
2+
title: 'Box',
33
}
44

55
# Box
@@ -8,23 +8,22 @@ The `Box` component is a layout primitive that can be used to create any kind of
88

99
It is just a `div` with some styles.
1010

11-
1211
## How to use
1312

1413
```jsx
1514
// Before
16-
<Box bg={"red"}/>
15+
<Box bg={"red"} />
1716

1817
// After
19-
<div className="d0"/>
18+
<div className="d0" />
2019
```
2120

22-
You can use the as prop to change the element type.
21+
You can use the `as` prop to change the element type.
2322

2423
```jsx
2524
// Before
26-
<Box as="span"/>
25+
<Box as={"span"} />
2726

2827
// After
29-
<span class="d0"/>
28+
<span className="d0" />
3029
```
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
export const metadata = {
2-
title: "Button",
2+
title: 'Button',
33
}
44

55
# Button
66

7-
The Button component is a simple button component that can be used to trigger actions.
7+
The `Button` component is a simple button component that can be used to trigger actions.
88

9+
## How to use
910

1011
```jsx
1112
// Before
12-
<Button bg={"red"}/>
13+
<Button bg={"red"} />
1314

1415
// After
15-
<button className="d0"/>
16+
<button className="d0" />
1617
```
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const metadata = {
2-
title: "Center",
2+
title: 'Center',
33
}
44

55
# Center
@@ -10,10 +10,18 @@ It has a `display: flex` style with `justify-content: center` and `align-items:
1010

1111
## How to use
1212

13-
```jsx
13+
````jsx
1414
// Before
15-
<Center/>
15+
<Center>
16+
<Box bg="blue" w={25} h={25} />
17+
<Box bg="blue" w={25} h={25} />
18+
<Box bg="blue" w={25} h={25} />
19+
</Center>
1620

1721
// After, It has 3 classes on default
18-
<div className="d0 d1 d2"/>
19-
```
22+
<div className="d3 d4 d5">
23+
<div className="d0 d1 d2"></div>
24+
<div className="d0 d1 d2"></div>
25+
<div className="d0 d1 d2"></div>
26+
</div>```
27+
````
Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,38 @@
11
export const metadata = {
2-
title: "css",
2+
title: 'css',
33
}
44

55
# css
66

7-
css function is a function that returns a string.
7+
`css` function is a function that returns a string.
88

9-
## Usage
9+
## How to use
1010

1111
### CSS Literal
12-
You can use the css function to create a css string.
12+
13+
You can use `css` as a tag function to create a css string. Pass in a string of css properties as an argument, ans it will be converted
14+
into a class list.
15+
1316
```jsx
14-
<any css={css`
17+
// Before
18+
<any className={css`
1519
color: red;
1620
`}/>
1721

18-
<any className={"d0"}/>
22+
// After
23+
<any className="d0"/>
1924
```
2025

2126
### CSS Object
22-
You can use the css function to create a css object.
27+
28+
You can also use the css function by passing in a css object as an argument.
29+
2330
```jsx
31+
// Before
2432
<any className={css({
2533
color: "red"
2634
})}/>
2735

28-
<any className={"d0"}/>
29-
```
30-
31-
Also, css function can be used in the style prop. (responsive, pseudo-class, etc.)
32-
```jsx
33-
// It works like this
34-
<any style={css({
35-
color: ["red", "blue"],
36-
_hover: {
37-
color: "green"
38-
}
39-
})}/>
36+
// After
37+
<any className="d0" />
4038
```
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const metadata = {
2-
title: "Flex",
2+
title: 'Flex',
33
}
44

55
# Flex
@@ -12,9 +12,8 @@ It has a `display: flex` style by default.
1212

1313
```jsx
1414
// Before
15-
<Flex/>
15+
<Flex />
1616

17-
// After, It has a class on default
18-
<div className="d0"/>
17+
// After, it has a class on default
18+
<div className="d0" />
1919
```
20-
Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const metadata = {
2-
title: "Grid",
2+
title: 'Grid',
33
}
44

55
# Grid
@@ -10,10 +10,19 @@ It has a `display: grid` style by default.
1010

1111
## How to use
1212

13-
```jsx
13+
````jsx
1414
// Before
15-
<Grid/>
15+
<Grid>
16+
<Box bg="blue" w={25} h={25} />
17+
<Box bg="blue" w={25} h={25} />
18+
<Box bg="blue" w={25} h={25} />
19+
</Grid>
1620

1721
// After, It has a class on default
18-
<div className="d0"/>
19-
```
22+
<div className="d3">
23+
<div className="d0 d1 d2"></div>
24+
<div className="d0 d1 d2"></div>
25+
<div className="d0 d1 d2"></div>
26+
</div>
27+
```
28+
````
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
export const metadata = {
2-
title: "Group Selector",
2+
title: 'Group Selector',
33
}
44

55
# Group Selector
66

7-
AThe `group` selector is used to apply styles to a group of elements. It is used to apply styles to a group of elements that are siblings of each other.
7+
The `group` selector is used to apply styles to a group of elements. It is used to apply styles to a group of elements that are siblings of each other.
88

9-
## Usage
9+
## How to use
1010

1111
```jsx
1212
<div role="group">
13-
<Box _groupHover={{bg: "red"}}/>
13+
<Box _groupHover={{ bg: 'red' }} />
14+
<Box _groupHover={{ bg: 'red' }} />
15+
<Box _groupHover={{ bg: 'red' }} />
1416
</div>
1517
```
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
export const metadata = {
2-
title: "Image",
2+
title: 'Image',
33
}
44

55
# Image
66

7-
The `Image` component is a layout primitive that can be used to create any kind of layout.
7+
The `Image` component is a layout primitive that can be used to render images.
88

99
It is just a `img` with some styles.
1010

1111
## How to use
1212

1313
```jsx
1414
// Before
15-
<Image src={"https://via.placeholder.com/150"}/>
15+
<Image src={"https://via.placeholder.com/150"} />
1616

1717
// After
18-
<img src={"https://via.placeholder.com/150"}/>
18+
<img src="https://via.placeholder.com/150" />
1919
```
20-
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
export const metadata = {
2-
title: "Input",
2+
title: 'Input',
33
}
44

55
# Input
66

7-
The input component is a layout primitive that can be used to create any kind of layout.
7+
The `input` component is a layout primitive that can be used to read user input.
88

99
It is just a `input` with some styles.
1010

1111
## How to use
1212

1313
```jsx
1414
// Before
15-
<Input/>
15+
<Input border={"3px solid black"} />
1616

1717
// After
18-
<input/>
18+
<input className="d0" />
1919
```
20-

0 commit comments

Comments
 (0)