Skip to content

Commit

Permalink
Merge pull request #77 from easy-form/docs/0630
Browse files Browse the repository at this point in the history
docs: update docs
  • Loading branch information
97vack authored Jun 30, 2024
2 parents 50b313e + 5fa95b9 commit 0a8980b
Show file tree
Hide file tree
Showing 271 changed files with 13,346 additions and 3,603 deletions.
48 changes: 48 additions & 0 deletions .dumi/component/Demo/index.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
.custom-demo {
margin: 25px 0;
border-radius: 10px;
@{dark-selector} & {
background-color: #292d3e;
}
}
.custom-demo button {
background-color: #f1f1f1;
border: 1px solid rgba(60, 60, 60, .29);
font-weight: 600;
padding: 5px 12px;
border-radius: 8px;
cursor: pointer;
@{dark-selector} & {
background-color: #2f2f2f;
color: #fff;
border: 1px solid rgba(84, 84, 84, .65);
&:hover {
background-color: #242424;
}
}
}

.custom-demo button:hover {
background-color: #f8f8f8;

}

.custom-demo input {
padding: 6px 12px;
border: 1px solid rgba(60, 60, 60, .29);
border-radius: 8px;
outline: none;
@{dark-selector} & {
background-color: #eee;
color: #242424;
border: 1px solid #242424;
}
}

.custom-demo input:focus {
border-color: rgba(60, 60, 60, .89);
}

.custom-demo .react-form-simple-form-item:not(.react-form-simple-form-item-top) {
margin-bottom: 0;
}
20 changes: 20 additions & 0 deletions .dumi/component/Demo/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';
import '../../theme/builtins/SourceCode/theme.less';
import './index.less';
function Demo(props: { children: any; style?: React.CSSProperties }) {
return (
<div
className="custom-demo"
style={{
boxShadow:
'0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07)',
padding: '22px 24px',
...props.style,
}}
>
{props.children}
</div>
);
}

export default Demo;
2 changes: 1 addition & 1 deletion .dumi/component/Hero/ActionButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const GetStarted = () => {
className="start-button"
onClick={() => {
const _base = isDefaultLocal() ? '' : base;
history.push(`${_base}/intro/introduce`);
history.push(`${_base}/intro/start`);
}}
>
{format({ id: 'hero.action.button.start' })}
Expand Down
11 changes: 6 additions & 5 deletions .dumi/component/Hero/Feature/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ export const Feature = React.memo(() => {
const { format, isLocalZH_CN } = useLocalFormat();
const { icons } = useControllerRef({
icons: [
{
name: 'jiekou',
title: format({ id: 'hero.feature.APITitle' }),
desc: format({ id: 'hero.feature.API' }),
},
{
name: 'code',
title: format({ id: 'hero.feature.codeTitle' }),
desc: format({ id: 'hero.feature.code' }),
},
{
name: 'jiekou',
title: format({ id: 'hero.feature.APITitle' }),
desc: format({ id: 'hero.feature.API' }),
},

{
name: 'shandian',
title: format({ id: 'hero.feature.speedTitle' }),
Expand Down
34 changes: 34 additions & 0 deletions .dumi/component/Hero/TextWrap/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react';
import Zoom from 'react-reveal/Zoom';

export const TextWrap = ({
style,
title,
content,
}: {
style?: React.CSSProperties;
title?: React.ReactNode;
content?: React.ReactNode;
}) => {
return (
<Zoom>
<div
style={{
marginBottom: '120px',
textAlign: 'center',
width: '50%',
marginLeft: 'auto',
marginRight: 'auto',
...style,
}}
>
<div style={{ fontSize: '45px', fontWeight: 'bold' }}>{title}</div>
<div style={{ marginTop: '50px', fontSize: '20px', lineHeight: '2' }}>
{content}
</div>
</div>
</Zoom>
);
};

export default TextWrap;
60 changes: 47 additions & 13 deletions .dumi/global.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ body {
font-family: @font-family;
ul {
li + li {
margin-top: 15px;

}
}

@{dark-selector} & {
color: @c-text-dark;
pre {
}
}
h2 {
font-size: 28px;
Expand Down Expand Up @@ -58,6 +61,7 @@ body {

.dumi-default-content:not([data-no-sidebar]) {
box-shadow: none !important;
transition: all .3s;
@{dark-selector} & {
background-color: @c-site-bg-dark !important;
}
Expand All @@ -70,7 +74,28 @@ body {
.dumi-default-previewer-demo {
// padding-left: 25px;
padding: 15px 0 20px 0;

button {
background-color: #f1f1f1;
border: 1px solid rgba(60, 60, 60, .29);
font-weight: 600;
padding: 5px 12px;
border-radius: 8px;
cursor: pointer;
&:hover {
background-color: #f8f8f8;
}
@{dark-selector} & {
background-color: #2f2f2f;
color: #fff;
border: 1px solid rgba(84, 84, 84, .65);
&:hover {
background-color: #242424;
}
}
+ button {
margin-left: 10px;
}
}
.input {
min-width: 150px;
padding: 8px 12px;
Expand All @@ -96,19 +121,27 @@ body {
font-size: 16px;
border-radius: 8px;
}
}
.dumi-default-previewer-meta {
border-top: none ;
// transition: all .5s;
.boxShaow();
&:hover {
.boxShaow();
border-radius: 15px !important;
input {
padding: 6px 12px;
border: 1.5px solid @c-border;
border-radius: 8px;
outline: none;

@{dark-selector} & {
background-color: #eee;
color: #242424;
border: 1px solid #242424;
&:focus {
border-color: @c-border;
}
}
&:focus {
border-color: rgba(60, 60, 60, .89);
}
}
}
.dumi-default-source-code {
margin-top: 10px;
}


.dumi-default-previewer-actions {
border-bottom: none !important;
}
Expand All @@ -117,6 +150,7 @@ body {
#root .dumi-default-doc-layout {
font-family: @font-family;
background-color: @c-site-bg ;
transition: all .3s;
@{dark-selector} & {
background-color: @c-site-bg-dark;
}
Expand Down
2 changes: 1 addition & 1 deletion .dumi/metadata/apis/docs_apiDemos_getContent.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"defaultValue": null,
"name": "attrs",
"type": {
"name": "GetContentOptionsAttrs"
"name": "Attrs"
},
"tags": {
"infoTitle": "attrs parameters",
Expand Down
10 changes: 5 additions & 5 deletions .dumi/metadata/apis/docs_apiDemos_getContentAttrs.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "(e: any, tagType?: \"checkbox\" | undefined) => void"
},
"tags": {
"localKey": "API.form.global.props.GetContentOptionsAttrs.onChange.desc",
"localKey": "API.form.global.props.Attrs.onChange.desc",
"description": "onChange event passed to UI control"
}
},
Expand All @@ -17,7 +17,7 @@
"name": "() => void"
},
"tags": {
"localKey": "API.form.global.props.GetContentOptionsAttrs.onBlur.desc",
"localKey": "API.form.global.props.Attrs.onBlur.desc",
"description": "The onBlur event passed to the UI control. This method does not receive any parameters."
}
},
Expand All @@ -28,7 +28,7 @@
"name": "any"
},
"tags": {
"localKey": "API.form.global.props.GetContentOptionsAttrs.value.desc",
"localKey": "API.form.global.props.Attrs.value.desc",
"description": "The value passed to the UI control."
}
},
Expand All @@ -39,7 +39,7 @@
"name": "boolean | undefined"
},
"tags": {
"localKey": "API.form.global.props.GetContentOptionsAttrs.readOnly.desc",
"localKey": "API.form.global.props.Attrs.readOnly.desc",
"description": "ReadOnly passed to the UI control."
}
},
Expand All @@ -50,7 +50,7 @@
"name": "boolean"
},
"tags": {
"localKey": "API.form.global.props.GetContentOptionsAttrs.checked.desc",
"localKey": "API.form.global.props.Attrs.checked.desc",
"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."
}
}
Expand Down
2 changes: 1 addition & 1 deletion .dumi/metadata/apis/docs_apiDemos_useFormReturnType.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"defaultValue": null,
"name": "render",
"type": {
"name": "(bindId: any, config?: RenderConfigTypes | undefined) => (parameter: RenderReturnFnArgTypes) => ReactNode"
"name": "(bindId: any, config?: RenderConfigType | undefined) => (parameter: RenderReturnFnArgTypes) => ReactNode"
},
"tags": {
"infoTitle": "Render Config",
Expand Down
Loading

0 comments on commit 0a8980b

Please sign in to comment.