mirror of
https://github.com/zhigang1992/react.git
synced 2026-03-27 22:54:38 +08:00
docs: fix sidebar text-transform (#570)
This commit is contained in:
@@ -36,7 +36,6 @@ const ActiveLink: React.FC<Props> = React.memo(({ href, text }) => {
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
cursor: pointer;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
a {
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@ import { AutoComplete, Spacer, Badge, Grid, Text, Code } from 'components'
|
||||
import { useState, useRef, useEffect } from 'react'
|
||||
|
||||
export const meta = {
|
||||
title: 'Auto-Complete',
|
||||
title: 'Autocomplete',
|
||||
group: 'Data Entry',
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export const meta = {
|
||||
AutoComplete control of input field.
|
||||
|
||||
<Playground
|
||||
desc="Basic usage, add auto-complete list for all inputs."
|
||||
desc="Basic usage, add autocomplete list for all inputs."
|
||||
scope={{ AutoComplete }}
|
||||
code={`
|
||||
() => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { Avatar, Spacer } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'avatar',
|
||||
title: 'Avatar',
|
||||
group: 'Data Display',
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import Home from '@geist-ui/react-icons/home'
|
||||
import Inbox from '@geist-ui/react-icons/inbox'
|
||||
|
||||
export const meta = {
|
||||
title: 'breadcrumbs',
|
||||
title: 'Breadcrumbs',
|
||||
group: 'Navigation',
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import Playground from 'lib/components/playground'
|
||||
import { ButtonDropdown, Spacer } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'button-dropdown',
|
||||
title: 'Button Dropdown',
|
||||
group: 'Navigation',
|
||||
index: 101,
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { Button, Spacer, ButtonGroup } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'Button-Group',
|
||||
title: 'Button Group',
|
||||
group: 'Data Entry',
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import UserX from '@geist-ui/react-icons/userX'
|
||||
import Power from '@geist-ui/react-icons/power'
|
||||
|
||||
export const meta = {
|
||||
title: 'button',
|
||||
title: 'Button',
|
||||
group: 'General',
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { Card, Spacer, Link, Image, Text, Divider, Code, Grid } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'card',
|
||||
title: 'Card',
|
||||
group: 'Surfaces',
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { Checkbox, Spacer } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'checkbox',
|
||||
title: 'Checkbox',
|
||||
group: 'Data Entry',
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { Collapse, Spacer, Text } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'collapse',
|
||||
title: 'Collapse',
|
||||
group: 'Surfaces',
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { Card, Fieldset, Button, Text, Divider } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'fieldset',
|
||||
title: 'Fieldset',
|
||||
group: 'Surfaces',
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { Tree, useToasts } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'File-Tree',
|
||||
title: 'File Tree',
|
||||
group: 'Data Display',
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import PlaygroundTitle from 'lib/components/playground/title'
|
||||
|
||||
export const meta = {
|
||||
title: 'Grid',
|
||||
group: 'layout',
|
||||
group: 'Layout',
|
||||
}
|
||||
|
||||
## Grid
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { Keyboard } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'keyboard',
|
||||
title: 'Keyboard',
|
||||
group: 'Data Display',
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Link, Text, Code, Spacer } from 'components'
|
||||
import NextLink from 'next/link'
|
||||
|
||||
export const meta = {
|
||||
title: 'link',
|
||||
title: 'Link',
|
||||
group: 'Navigation',
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import NextLink from 'next/link'
|
||||
import { useState } from 'react'
|
||||
|
||||
export const meta = {
|
||||
title: 'modal',
|
||||
title: 'Modal',
|
||||
group: 'Feedback',
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { Note } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'note',
|
||||
title: 'Note',
|
||||
group: 'Feedback',
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import MockPage from 'lib/components/displays/mock-page'
|
||||
|
||||
export const meta = {
|
||||
title: 'Page',
|
||||
group: 'layout',
|
||||
group: 'Layout',
|
||||
}
|
||||
|
||||
## Page
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Radio, Spacer, Code } from 'components'
|
||||
import { useState } from 'react'
|
||||
|
||||
export const meta = {
|
||||
title: 'radio',
|
||||
title: 'Radio',
|
||||
group: 'Data Entry',
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { Select, Spacer, Code, Modal, useModal, Button } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'select',
|
||||
title: 'Select',
|
||||
group: 'Data Entry',
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Spacer, Grid } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'Spacer',
|
||||
group: 'layout',
|
||||
group: 'Layout',
|
||||
}
|
||||
|
||||
## Spacer
|
||||
|
||||
@@ -5,7 +5,7 @@ import TwitterIcon from '@geist-ui/react-icons/twitter'
|
||||
import TwitchIcon from '@geist-ui/react-icons/twitch'
|
||||
|
||||
export const meta = {
|
||||
title: 'tabs',
|
||||
title: 'Tabs',
|
||||
group: 'Navigation',
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { Text } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'text',
|
||||
title: 'Text',
|
||||
group: 'General',
|
||||
index: 10,
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Textarea, Spacer, useInput, Button, Code } from 'components'
|
||||
import { useState } from 'react'
|
||||
|
||||
export const meta = {
|
||||
title: 'textarea',
|
||||
title: 'Textarea',
|
||||
group: 'Data Entry',
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { useToasts, Button, Spacer } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'toast',
|
||||
title: 'Toast',
|
||||
group: 'Feedback',
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { Button, Spacer, Text, Link, useBodyScroll } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'use-body-scroll',
|
||||
title: 'useBodyScroll',
|
||||
group: 'Utils',
|
||||
}
|
||||
|
||||
## Use body scroll
|
||||
## useBodyScroll
|
||||
|
||||
Disable scrolling behavior for body or any element, it is useful for displaying popup element or menus.
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { Link, Card, Spacer, useClickAway } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'use-click-away',
|
||||
title: 'useClickAway',
|
||||
group: 'Utils',
|
||||
}
|
||||
|
||||
## Use click away
|
||||
## useClickAway
|
||||
|
||||
Detect if a click event happened outside of an element.
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { useClipboard, Link, Button, useToasts, Spacer } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'use-clipboard',
|
||||
title: 'useClipboard',
|
||||
group: 'Utils',
|
||||
}
|
||||
|
||||
## Use clipboard
|
||||
## useClipboard
|
||||
|
||||
Copy string to clipboard.
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { useCurrentState, Link, Button, Spacer } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'use-current-state',
|
||||
title: 'useCurrentState',
|
||||
group: 'Utils',
|
||||
}
|
||||
|
||||
## Use current state
|
||||
## useCurrentState
|
||||
|
||||
Get **the latest value** in functional component. By default, `state` in a React FC
|
||||
can only get the value at render time, not the latest.
|
||||
|
||||
@@ -2,11 +2,11 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { useKeyboard, KeyCode, KeyMod, Keyboard, Input, Link } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'use-keyboard',
|
||||
title: 'useKeyboard',
|
||||
group: 'Utils',
|
||||
}
|
||||
|
||||
## Use Keyboard
|
||||
## useKeyboard
|
||||
|
||||
React Hooks for listen to multiple keyboard events.
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ import { useMediaQuery, Link, Code, Spacer } from 'components'
|
||||
import NextLink from 'next/link'
|
||||
|
||||
export const meta = {
|
||||
title: 'use-media-query',
|
||||
title: 'useMediaQuery',
|
||||
group: 'Utils',
|
||||
}
|
||||
|
||||
## Use MediaQuery
|
||||
## useMediaQuery
|
||||
|
||||
CSS media query hooks, it is implemented through the `MediaQuery` API.
|
||||
If you just want to build the layout, try <NextLink href="/en-us/components/grid"><Link color>Grid Component</Link></NextLink>.
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Text, Spacer } from 'components'
|
||||
import CustomizationLayout from 'lib/components/customization/layout'
|
||||
import CustomizationEditor from 'lib/components/customization/editor'
|
||||
import PageHeader from 'lib/components/header'
|
||||
|
||||
const meta = {
|
||||
title: 'Customization',
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import Colors from 'lib/components/displays/colors'
|
||||
|
||||
export const meta = {
|
||||
title: 'Colors',
|
||||
group: 'customization',
|
||||
group: 'Customization',
|
||||
index: 20,
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import Layout from 'lib/components/layout'
|
||||
import { Note, Link, Code, Spacer, Tabs, Dot, Snippet, Grid, Text } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'installation',
|
||||
group: 'getting-started',
|
||||
title: 'Installation',
|
||||
group: 'Getting Started',
|
||||
index: 10,
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import Layout from 'lib/components/layout'
|
||||
import { Code, Link, Text, Spacer, Note } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'introduction',
|
||||
group: 'getting-started',
|
||||
title: 'Introduction',
|
||||
group: 'Getting Started',
|
||||
index: 5,
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Note, Text, Spacer, Display, Code, Grid, Button, Link } from 'component
|
||||
|
||||
export const meta = {
|
||||
title: 'Scaleable',
|
||||
group: 'customization',
|
||||
group: 'Customization',
|
||||
index: 30,
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Code, Link, Spacer, Note } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'Server Render',
|
||||
group: 'getting-started',
|
||||
group: 'Getting Started',
|
||||
index: 15,
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Note, Code, Spacer, Link } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: 'Themes',
|
||||
group: 'customization',
|
||||
group: 'Customization',
|
||||
index: 25,
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@ import { AutoComplete, Spacer, Badge, Text, Grid, Code } from 'components'
|
||||
import { useState, useRef, useEffect } from 'react'
|
||||
|
||||
export const meta = {
|
||||
title: '自动完成 Auto-Complete',
|
||||
title: '自动完成 Autocomplete',
|
||||
group: '数据录入',
|
||||
index: 104,
|
||||
}
|
||||
|
||||
## Auto Complete / 自动完成
|
||||
## Autocomplete / 自动完成
|
||||
|
||||
输入框的自动完成控制。
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Layout, Playground, Attributes } from 'lib/components'
|
||||
import { Button, Spacer, ButtonGroup } from 'components'
|
||||
|
||||
export const meta = {
|
||||
title: '按钮组 Button-Group',
|
||||
title: '按钮组 Button Group',
|
||||
group: '数据录入',
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ export const meta = {
|
||||
group: '工具包',
|
||||
}
|
||||
|
||||
## Use body scroll / 工具包
|
||||
## useBodyScroll / 工具包
|
||||
|
||||
禁用 `Body` 或其他任何元素的滚动,这在显示弹窗或菜单时非常有帮助。
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ export const meta = {
|
||||
group: '工具包',
|
||||
}
|
||||
|
||||
## Use click away / 点击他处触发事件
|
||||
## useClickAway / 点击他处触发事件
|
||||
|
||||
检测点击事件是否在元素之外。
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ export const meta = {
|
||||
group: '工具包',
|
||||
}
|
||||
|
||||
## Use clipboard / 拷贝至剪切板
|
||||
## useClipboard / 拷贝至剪切板
|
||||
|
||||
拷贝字符串到剪切板。
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ export const meta = {
|
||||
group: '工具包',
|
||||
}
|
||||
|
||||
## Use current state / 获取当前值
|
||||
## useCurrentState / 获取当前值
|
||||
|
||||
在函数式组件内获取 **最新的值**。默认场景下,React 函数式组件只能获取渲染当时 `state` 的值,这并非是最新的。
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ export const meta = {
|
||||
group: '工具包',
|
||||
}
|
||||
|
||||
## Use Keyboard / 键盘事件
|
||||
## useKeyboard / 键盘事件
|
||||
|
||||
用户监听多个键盘事件的钩子。
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ export const meta = {
|
||||
group: '工具包',
|
||||
}
|
||||
|
||||
## Use MediaQuery / 媒体查询
|
||||
## useMediaQuery / 媒体查询
|
||||
|
||||
用于 CSS 媒体查询的钩子,钩子通过 `MediaQuery` API 实现。如果你仅仅想要构建响应式的布局,
|
||||
请尝试 <NextLink href="/en-us/components/grid"><Link color>栅格组件</Link></NextLink>。
|
||||
|
||||
Reference in New Issue
Block a user