{alias}]
+ [{isChinese ? '别名' : 'alias'}: {alias}]
)
}
@@ -17,12 +18,13 @@ const AttributesTitle: React.FC{children}
- {getAlias(alias)}
+ {getAlias(!!isChinese, alias)}
shell code snippets? Try Snippet.shell code snippets? Try Snippet.Loading? Use the Loading? Use the useTheme.}>
diff --git a/pages/docs/customization/themes.mdx b/pages/en-us/customization/themes.mdx
similarity index 100%
rename from pages/docs/customization/themes.mdx
rename to pages/en-us/customization/themes.mdx
diff --git a/pages/docs/getting-started/installation.mdx b/pages/en-us/getting-started/installation.mdx
similarity index 100%
rename from pages/docs/getting-started/installation.mdx
rename to pages/en-us/getting-started/installation.mdx
diff --git a/pages/docs/getting-started/introduction.mdx b/pages/en-us/getting-started/introduction.mdx
similarity index 97%
rename from pages/docs/getting-started/introduction.mdx
rename to pages/en-us/getting-started/introduction.mdx
index 304f2fa..bfdd5b1 100644
--- a/pages/docs/getting-started/introduction.mdx
+++ b/pages/en-us/getting-started/introduction.mdx
@@ -3,11 +3,9 @@ import { Code, Link, Text, Spacer, Note } from 'components'
export const meta = {
title: 'introduction',
- description: 'description',
index: 5,
}
-
## Introduction
### Why @zeit-ui/react
diff --git a/pages/docs/getting-started/server-render.mdx b/pages/en-us/getting-started/server-render.mdx
similarity index 100%
rename from pages/docs/getting-started/server-render.mdx
rename to pages/en-us/getting-started/server-render.mdx
diff --git a/pages/en-us/index.js b/pages/en-us/index.js
new file mode 100644
index 0000000..5c9a483
--- /dev/null
+++ b/pages/en-us/index.js
@@ -0,0 +1,3 @@
+import redirect from 'lib/redirect'
+
+export default redirect('/en-us/getting-started/introduction')
diff --git a/pages/index.ts b/pages/index.ts
index 48a596b..afdb28b 100644
--- a/pages/index.ts
+++ b/pages/index.ts
@@ -1,3 +1,3 @@
import redirect from 'lib/redirect'
-export default redirect('/docs')
+export default redirect('/en-us')
diff --git a/pages/zh-cn/components/auto-complete.mdx b/pages/zh-cn/components/auto-complete.mdx
new file mode 100644
index 0000000..ab1ebd5
--- /dev/null
+++ b/pages/zh-cn/components/auto-complete.mdx
@@ -0,0 +1,267 @@
+import { Layout, Playground, Attributes } from 'lib/components'
+import { AutoComplete, Spacer, Badge, Row } from 'components'
+import { useState, useRef, useEffect } from 'react'
+
+export const meta = {
+ title: 'Auto-Complete / 自动完成',
+ index: 104,
+}
+
+## Auto Complete / 自动完成
+
+输入框的自动完成控制。
+
+一个基础的卡片。
+ +`} /> + +可悬停的卡片。
+ +`} /> + +阴影卡片组件。
+ +`} /> + +Shell 代码片段或一个命令?可以试试 Snippet / 片段 组件。npm i @zeit-ui/react to install.
+`} />
+
+
+{codes}
+}
+`} />
+
+{codes}
+}
+`} />
+
+{codes}
+}
+`} />
+
+通信 的最佳实践。>} />
+`} />
+
+
+ {codes}
+ www.zeit.rocks 重定向至 zeit.rocks。}>
+
+
+`} />
+
+height 属性可以尽可能的减少重绘。}>
+ 部署 问题详情useInput>}
+ desc="使用 `hooks` 捕获输入框的文本变化。"
+ scope={{ Input, useInput, useEffect, Button, Spacer }}
+ code={`
+() => {
+ const { state, setState, reset, bindings } = useInput('The Evil Rabbit')
+ useEffect(() => console.log(state), [state])
+ return (
+ <>
+
+ next/link 组合>}
+ desc="使用 `Link` 组件与 NextJS 组合使用不需要任何额外的配置。"
+ scope={{ Link, NextLink }}
+ code={`
+ yield 关键字通常不能在箭头函数中使用(除非是嵌套在允许使用的函数内)。因此,箭头函数不能用作函数生成器。
useModal 组合>}
+ desc="使用 `hooks` 可以更简单的控制对话框。"
+ scope={{ Modal, Button, useModal, Code }}
+ code={`
+() => {
+ const { visible, setVisible, bindings } = useModal()
+ return (
+ <>
+
+ yield 关键字通常不能在箭头函数中使用(除非是嵌套在允许使用的函数内)。因此,箭头函数不能用作函数生成器。
yield 关键字通常不能在箭头函数中使用(除非是嵌套在允许使用的函数内)。因此,箭头函数不能用作函数生成器。
yield 关键字通常不能在箭头函数中使用(除非是嵌套在允许使用的函数内)。因此,箭头函数不能用作函数生成器。
caller 和 arguments 属性已经废弃,因为它们会泄漏调用函数的对象。
+`} />
+
+TypeScriptJavaScriptstring, default: '-' },
+ { property: boolean, default: true },
+ ]
+ return (
+ string, default: '-' },
+ { property: boolean, default: true },
+ ]
+ return (
+ string, default: '-' },
+ { property: boolean, default: true },
+ ]
+ return (
+ useTabs 组合>}
+ desc="使用 `hooks` 以更简单的方式控制选项卡。"
+ scope={{ Tabs, Button, Spacer, useTabs }}
+ code={`
+() => {
+ const { setState, bindings } = useTabs('1')
+ return (
+ <>
+
+ useInput 组合>}
+ desc="通过 `hooks` 以更简单的方式驱动文本框。"
+ scope={{ Textarea, useInput, Button, Spacer }}
+ code={`
+() => {
+ const { setState, reset, bindings } = useInput('CSS(层叠样式表)用于设置和布置网页 - 例如,更改内容的字体,颜色,大小和间距,将其拆分为多个列,或添加动画和其他装饰功能。')
+ return (
+ <>
+
+ useTheme 函数中获取调色板。}>
+
+```jsx
+import { useTheme } from '@zeit-ui/react'
+
+const myComponent = () => {
+ const { palette } = useTheme()
+
+ return (
+ myComponent
+ ) +} +``` + +ZEITUIProvider 至应用的根节点。CSSBaseline 提供了基础的 CSS 样式,这和你熟悉的 normalize 有些类似。