Skip to content

Commit 5fa95b9

Browse files
committed
docs: update docs
1 parent 50b313e commit 5fa95b9

File tree

271 files changed

+13346
-3603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+13346
-3603
lines changed

.dumi/component/Demo/index.less

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
.custom-demo {
2+
margin: 25px 0;
3+
border-radius: 10px;
4+
@{dark-selector} & {
5+
background-color: #292d3e;
6+
}
7+
}
8+
.custom-demo button {
9+
background-color: #f1f1f1;
10+
border: 1px solid rgba(60, 60, 60, .29);
11+
font-weight: 600;
12+
padding: 5px 12px;
13+
border-radius: 8px;
14+
cursor: pointer;
15+
@{dark-selector} & {
16+
background-color: #2f2f2f;
17+
color: #fff;
18+
border: 1px solid rgba(84, 84, 84, .65);
19+
&:hover {
20+
background-color: #242424;
21+
}
22+
}
23+
}
24+
25+
.custom-demo button:hover {
26+
background-color: #f8f8f8;
27+
28+
}
29+
30+
.custom-demo input {
31+
padding: 6px 12px;
32+
border: 1px solid rgba(60, 60, 60, .29);
33+
border-radius: 8px;
34+
outline: none;
35+
@{dark-selector} & {
36+
background-color: #eee;
37+
color: #242424;
38+
border: 1px solid #242424;
39+
}
40+
}
41+
42+
.custom-demo input:focus {
43+
border-color: rgba(60, 60, 60, .89);
44+
}
45+
46+
.custom-demo .react-form-simple-form-item:not(.react-form-simple-form-item-top) {
47+
margin-bottom: 0;
48+
}

.dumi/component/Demo/index.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from 'react';
2+
import '../../theme/builtins/SourceCode/theme.less';
3+
import './index.less';
4+
function Demo(props: { children: any; style?: React.CSSProperties }) {
5+
return (
6+
<div
7+
className="custom-demo"
8+
style={{
9+
boxShadow:
10+
'0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07)',
11+
padding: '22px 24px',
12+
...props.style,
13+
}}
14+
>
15+
{props.children}
16+
</div>
17+
);
18+
}
19+
20+
export default Demo;

.dumi/component/Hero/ActionButton/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const GetStarted = () => {
1212
className="start-button"
1313
onClick={() => {
1414
const _base = isDefaultLocal() ? '' : base;
15-
history.push(`${_base}/intro/introduce`);
15+
history.push(`${_base}/intro/start`);
1616
}}
1717
>
1818
{format({ id: 'hero.action.button.start' })}

.dumi/component/Hero/Feature/index.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ export const Feature = React.memo(() => {
88
const { format, isLocalZH_CN } = useLocalFormat();
99
const { icons } = useControllerRef({
1010
icons: [
11-
{
12-
name: 'jiekou',
13-
title: format({ id: 'hero.feature.APITitle' }),
14-
desc: format({ id: 'hero.feature.API' }),
15-
},
1611
{
1712
name: 'code',
1813
title: format({ id: 'hero.feature.codeTitle' }),
1914
desc: format({ id: 'hero.feature.code' }),
2015
},
16+
{
17+
name: 'jiekou',
18+
title: format({ id: 'hero.feature.APITitle' }),
19+
desc: format({ id: 'hero.feature.API' }),
20+
},
21+
2122
{
2223
name: 'shandian',
2324
title: format({ id: 'hero.feature.speedTitle' }),
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import React from 'react';
2+
import Zoom from 'react-reveal/Zoom';
3+
4+
export const TextWrap = ({
5+
style,
6+
title,
7+
content,
8+
}: {
9+
style?: React.CSSProperties;
10+
title?: React.ReactNode;
11+
content?: React.ReactNode;
12+
}) => {
13+
return (
14+
<Zoom>
15+
<div
16+
style={{
17+
marginBottom: '120px',
18+
textAlign: 'center',
19+
width: '50%',
20+
marginLeft: 'auto',
21+
marginRight: 'auto',
22+
...style,
23+
}}
24+
>
25+
<div style={{ fontSize: '45px', fontWeight: 'bold' }}>{title}</div>
26+
<div style={{ marginTop: '50px', fontSize: '20px', lineHeight: '2' }}>
27+
{content}
28+
</div>
29+
</div>
30+
</Zoom>
31+
);
32+
};
33+
34+
export default TextWrap;

.dumi/global.less

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ body {
2121
font-family: @font-family;
2222
ul {
2323
li + li {
24-
margin-top: 15px;
24+
2525
}
2626
}
27+
2728
@{dark-selector} & {
2829
color: @c-text-dark;
30+
pre {
31+
}
2932
}
3033
h2 {
3134
font-size: 28px;
@@ -58,6 +61,7 @@ body {
5861

5962
.dumi-default-content:not([data-no-sidebar]) {
6063
box-shadow: none !important;
64+
transition: all .3s;
6165
@{dark-selector} & {
6266
background-color: @c-site-bg-dark !important;
6367
}
@@ -70,7 +74,28 @@ body {
7074
.dumi-default-previewer-demo {
7175
// padding-left: 25px;
7276
padding: 15px 0 20px 0;
73-
77+
button {
78+
background-color: #f1f1f1;
79+
border: 1px solid rgba(60, 60, 60, .29);
80+
font-weight: 600;
81+
padding: 5px 12px;
82+
border-radius: 8px;
83+
cursor: pointer;
84+
&:hover {
85+
background-color: #f8f8f8;
86+
}
87+
@{dark-selector} & {
88+
background-color: #2f2f2f;
89+
color: #fff;
90+
border: 1px solid rgba(84, 84, 84, .65);
91+
&:hover {
92+
background-color: #242424;
93+
}
94+
}
95+
+ button {
96+
margin-left: 10px;
97+
}
98+
}
7499
.input {
75100
min-width: 150px;
76101
padding: 8px 12px;
@@ -96,19 +121,27 @@ body {
96121
font-size: 16px;
97122
border-radius: 8px;
98123
}
99-
}
100-
.dumi-default-previewer-meta {
101-
border-top: none ;
102-
// transition: all .5s;
103-
.boxShaow();
104-
&:hover {
105-
.boxShaow();
106-
border-radius: 15px !important;
124+
input {
125+
padding: 6px 12px;
126+
border: 1.5px solid @c-border;
127+
border-radius: 8px;
128+
outline: none;
129+
130+
@{dark-selector} & {
131+
background-color: #eee;
132+
color: #242424;
133+
border: 1px solid #242424;
134+
&:focus {
135+
border-color: @c-border;
136+
}
137+
}
138+
&:focus {
139+
border-color: rgba(60, 60, 60, .89);
140+
}
107141
}
108142
}
109-
.dumi-default-source-code {
110-
margin-top: 10px;
111-
}
143+
144+
112145
.dumi-default-previewer-actions {
113146
border-bottom: none !important;
114147
}
@@ -117,6 +150,7 @@ body {
117150
#root .dumi-default-doc-layout {
118151
font-family: @font-family;
119152
background-color: @c-site-bg ;
153+
transition: all .3s;
120154
@{dark-selector} & {
121155
background-color: @c-site-bg-dark;
122156
}

.dumi/metadata/apis/docs_apiDemos_getContent.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"defaultValue": null,
5050
"name": "attrs",
5151
"type": {
52-
"name": "GetContentOptionsAttrs"
52+
"name": "Attrs"
5353
},
5454
"tags": {
5555
"infoTitle": "attrs parameters",

.dumi/metadata/apis/docs_apiDemos_getContentAttrs.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"name": "(e: any, tagType?: \"checkbox\" | undefined) => void"
77
},
88
"tags": {
9-
"localKey": "API.form.global.props.GetContentOptionsAttrs.onChange.desc",
9+
"localKey": "API.form.global.props.Attrs.onChange.desc",
1010
"description": "onChange event passed to UI control"
1111
}
1212
},
@@ -17,7 +17,7 @@
1717
"name": "() => void"
1818
},
1919
"tags": {
20-
"localKey": "API.form.global.props.GetContentOptionsAttrs.onBlur.desc",
20+
"localKey": "API.form.global.props.Attrs.onBlur.desc",
2121
"description": "The onBlur event passed to the UI control. This method does not receive any parameters."
2222
}
2323
},
@@ -28,7 +28,7 @@
2828
"name": "any"
2929
},
3030
"tags": {
31-
"localKey": "API.form.global.props.GetContentOptionsAttrs.value.desc",
31+
"localKey": "API.form.global.props.Attrs.value.desc",
3232
"description": "The value passed to the UI control."
3333
}
3434
},
@@ -39,7 +39,7 @@
3939
"name": "boolean | undefined"
4040
},
4141
"tags": {
42-
"localKey": "API.form.global.props.GetContentOptionsAttrs.readOnly.desc",
42+
"localKey": "API.form.global.props.Attrs.readOnly.desc",
4343
"description": "ReadOnly passed to the UI control."
4444
}
4545
},
@@ -50,7 +50,7 @@
5050
"name": "boolean"
5151
},
5252
"tags": {
53-
"localKey": "API.form.global.props.GetContentOptionsAttrs.checked.desc",
53+
"localKey": "API.form.global.props.Attrs.checked.desc",
5454
"description": "Passed to the checked attribute of the UI control, the checked selection is based on the existence of the value. If the value of the value is meaningful, that is, if the value has a value, it will be true."
5555
}
5656
}

.dumi/metadata/apis/docs_apiDemos_useFormReturnType.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"defaultValue": null,
44
"name": "render",
55
"type": {
6-
"name": "(bindId: any, config?: RenderConfigTypes | undefined) => (parameter: RenderReturnFnArgTypes) => ReactNode"
6+
"name": "(bindId: any, config?: RenderConfigType | undefined) => (parameter: RenderReturnFnArgTypes) => ReactNode"
77
},
88
"tags": {
99
"infoTitle": "Render Config",

0 commit comments

Comments
 (0)