Skip to content

Commit e68f615

Browse files
committed
Update landing
1 parent 2776d99 commit e68f615

File tree

34 files changed

+2316
-116
lines changed

34 files changed

+2316
-116
lines changed

apps/landing/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"lint": "eslint"
1111
},
1212
"dependencies": {
13+
"body-scroll-lock": "3.1.5",
1314
"@devup-ui/react": "workspace:*",
1415
"@mdx-js/loader": "^3.1.0",
1516
"@mdx-js/react": "^3.1.0",
@@ -22,6 +23,7 @@
2223
"sanitize.css": "^13.0.0"
2324
},
2425
"devDependencies": {
26+
"@types/body-scroll-lock": "^3.1.2",
2527
"@devup-ui/next-plugin": "workspace:*",
2628
"@types/node": "^22",
2729
"@types/react": "^19",

apps/landing/src/app/(detail)/docs/LeftMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { MenuItem } from './MenuItem'
55

66
export function LeftMenu() {
77
return (
8-
<VStack gap="6px" h="1008px" p="20px 16px" w="220px">
8+
<VStack gap="6px">
99
<MenuItem to={URL_PREFIX + '/docs/overview'}>Overview</MenuItem>
1010
<MenuItem to={URL_PREFIX + '/docs/installation'}>Installation</MenuItem>
1111
<MenuItem to={URL_PREFIX + '/docs/features'}>Features</MenuItem>

apps/landing/src/app/(detail)/docs/MenuItem.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ export function MenuItem(props: MenuItemProps) {
2424
if (subMenu) return <OpenMenuItem {...props} subMenu={subMenu} />
2525
const inner = (
2626
<Flex
27+
_hover={
28+
selected
29+
? undefined
30+
: {
31+
bg: '$menuHover',
32+
}
33+
}
2734
alignItems="center"
2835
bg={selected ? '$menuActive' : undefined}
2936
borderRadius="6px"

apps/landing/src/app/(detail)/docs/OpenMenuItem.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export function OpenMenuItem({
2020
return (
2121
<>
2222
<Flex
23+
_hover={{
24+
bg: '$menuHover',
25+
}}
2326
alignItems="center"
2427
bg={selected ? '$menuActive' : undefined}
2528
borderRadius="6px"
@@ -54,6 +57,9 @@ export function OpenMenuItem({
5457
const selected = to ? path.startsWith(to) : false
5558
const inner = (
5659
<Flex
60+
_hover={{
61+
bg: '$menuHover',
62+
}}
5763
alignItems="center"
5864
bg={selected ? '$menuActive' : undefined}
5965
borderRadius="6px"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,26 @@
11
# Box
2+
3+
The `Box` component is a layout primitive that can be used to create any kind of layout.
4+
5+
It is just a `div` with some styles.
6+
7+
8+
## How to use
9+
10+
```jsx
11+
// Before
12+
<Box bg={"red"}/>
13+
14+
// After
15+
<div className="d0"/>
16+
```
17+
18+
You can use the as prop to change the element type.
19+
20+
```jsx
21+
// Before
22+
<Box as="span"/>
23+
24+
// After
25+
<span class="d0"/>
26+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
11
# Button
2+
3+
The Button component is a simple button component that can be used to trigger actions.
4+
5+
6+
```jsx
7+
// Before
8+
<Button bg={"red"}/>
9+
10+
// After
11+
<button className="d0"/>
12+
```
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
11
# Center
2+
3+
The `Center` component is a layout component that centers its children both vertically and horizontally.
4+
5+
It has a `display: flex` style with `justify-content: center` and `align-items: center`.
6+
7+
## How to use
8+
9+
```jsx
10+
// Before
11+
<Center/>
12+
13+
// After, It has 3 classes on default
14+
<div className="d0 d1 d2"/>
15+
```
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,36 @@
11
# css
2+
3+
css function is a function that returns a string.
4+
5+
## Usage
6+
7+
### CSS Literal
8+
You can use the css function to create a css string.
9+
```jsx
10+
<any css={css`
11+
color: red;
12+
`}/>
13+
14+
<any className={"d0"}/>
15+
```
16+
17+
### CSS Object
18+
You can use the css function to create a css object.
19+
```jsx
20+
<any className={css({
21+
color: "red"
22+
})}/>
23+
24+
<any className={"d0"}/>
25+
```
26+
27+
Also, css function can be used in the style prop. (responsive, pseudo-class, etc.)
28+
```jsx
29+
// It works like this
30+
<any style={css({
31+
color: ["red", "blue"],
32+
_hover: {
33+
color: "green"
34+
}
35+
})}/>
36+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
11
# Flex
2+
3+
The `Flex` component is a layout component that uses flexbox to layout its children.
4+
5+
It has a `display: flex` style by default.
6+
7+
## How to use
8+
9+
```jsx
10+
// Before
11+
<Flex/>
12+
13+
// After, It has a class on default
14+
<div className="d0"/>
15+
```
16+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
11
# Grid
2+
3+
The grid component is a layout component that arranges its children in a grid layout. It supports both fixed and fluid layouts.
4+
5+
It has a `display: grid` style by default.
6+
7+
## How to use
8+
9+
```jsx
10+
// Before
11+
<Grid/>
12+
13+
// After, It has a class on default
14+
<div className="d0"/>
15+
```

0 commit comments

Comments
 (0)