Skip to content

doc: add timeline doc #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Aug 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/src/Steps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ function Demo() {
| 参数 | 说明 | 类型 | 默认值 |
| -------------------- | ------------ | ------- | ------- |
| `title` |步骤标题 | Item[] | - |
| `desc` | 步骤说明文字 | Number | 0 |
| `desc` | 步骤说明文字 | String | - |
| `status` | 步骤的状态,'success' 或 'error' | String | - |
2 changes: 1 addition & 1 deletion packages/core/src/Timeline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Timeline 时间轴
### 基础示例

```jsx
import { Steps } from '@uiw/react-native';
import { Timeline } from '@uiw/react-native';

function Demo() {
return (
Expand Down
11 changes: 11 additions & 0 deletions website/src/pages/components/timeLine/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Markdown, { importAll } from '../../../component/Markdown';

export default class Page extends Markdown {
path="/packages/core/src/Timeline/README.md"
getMarkdown = async () => {
const md = await import('@uiw/react-native/lib/Timeline/README.md');
// 支持 markdown 中,相对于当前 index.tsx 相对路径引入图片资源
importAll((require as any).context('./', true, /\.(png|gif|jpg)$/), this.imageFiles);
return md.default || md;
}
}
1 change: 1 addition & 0 deletions website/src/routes/menus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const componentMenus: MenuData[] = [
{ path: "/components/grid", name: "Grid 宫格" },
{ path: "/components/list", name: "List 列表" },
{ path: "/components/steps", name: "Steps 步骤条" },
{ path: "/components/timeLine", name: "Timeline 时间轴" },
{ divider: true, name: "Feedback" },
{ path: "/components/loader", name: "Loader 加载" },
{ path: "/components/modal", name: "Modal 模态框" },
Expand Down
3 changes: 3 additions & 0 deletions website/src/routes/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,7 @@ export const getRouterData = {
'/components/steps': {
component: dynamicWrapper([], () => import('../pages/components/steps')),
},
'/components/timeLine': {
component: dynamicWrapper([], () => import('../pages/components/timeLine')),
},
};