Skip to content

Commit

Permalink
fix: handle pr
Browse files Browse the repository at this point in the history
  • Loading branch information
Yilun-Sun committed Oct 25, 2022
1 parent 67294de commit 2c8c013
Show file tree
Hide file tree
Showing 15 changed files with 2,528 additions and 272 deletions.
40 changes: 0 additions & 40 deletions src/guide/_example/base.css

This file was deleted.

53 changes: 51 additions & 2 deletions src/guide/_example/base.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,57 @@
import React from 'react';
import React, { useEffect } from 'react';
import { Button, Drawer, Guide, Input, Row } from 'tdesign-react';
import './base.css';

const classStyles = `
<style>
.guide-container {
max-width: 600px;
padding: 40px;
}
.title-major {
color: var(--td-text-color-primary);
font-size: 36px;
font-weight: 700;
line-height: 44px;
}
.title-sub {
margin-top: 8px;
color: var(--td-text-color-secondary);
font-size: 14px;
font-weight: 400;
line-height: 22px;
}
.field {
margin-top: 50px;
}
.label {
margin-bottom: 8px;
color: var(--td-text-color-primary);
font-size: 14px;
font-weight: 400;
line-height: 22px;
}
.action {
display: inline-flex;
margin-top: 50px;
}
.action button:first-child {
margin-right: 10px;
}
</style>
`;

export default function BasicGuide() {
useEffect(() => {
// 添加示例代码所需样式
document.head.insertAdjacentHTML('beforeend', classStyles);
}, []);

const steps = [
{
element: '.main-title-base',
Expand Down
40 changes: 0 additions & 40 deletions src/guide/_example/custom-popup.css

This file was deleted.

53 changes: 51 additions & 2 deletions src/guide/_example/custom-popup.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,58 @@
import React from 'react';
import React, { useEffect } from 'react';
import { Button, Drawer, Guide, Input, Row } from 'tdesign-react';
import './custom-popup.css';
import MyPopup from './my-popup';

const classStyles = `
<style>
.guide-container {
max-width: 600px;
padding: 40px;
}
.title-major {
color: var(--td-text-color-primary);
font-size: 36px;
font-weight: 700;
line-height: 44px;
}
.title-sub {
margin-top: 8px;
color: var(--td-text-color-secondary);
font-size: 14px;
font-weight: 400;
line-height: 22px;
}
.field {
margin-top: 50px;
}
.label {
margin-bottom: 8px;
color: var(--td-text-color-primary);
font-size: 14px;
font-weight: 400;
line-height: 22px;
}
.action {
display: inline-flex;
margin-top: 50px;
}
.action button:first-child {
margin-right: 10px;
}
</style>
`;

export default function CustomPopupGuide() {
useEffect(() => {
// 添加示例代码所需样式
document.head.insertAdjacentHTML('beforeend', classStyles);
}, []);

const [visible, setVisible] = React.useState(false);
const [current, setCurrent] = React.useState(-1);

Expand Down
12 changes: 0 additions & 12 deletions src/guide/_example/dialog-body.css

This file was deleted.

35 changes: 32 additions & 3 deletions src/guide/_example/dialog-body.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,39 @@
import React from 'react';
import './dialog-body.css';
import React, { useEffect } from 'react';

const classStyles = `
<style>
.dialog-body .img-wrapper {
border-radius: var(--td-radius-default);
overflow: hidden;
}
.dialog-body p {
margin-top: 24px;
color: var(--td-text-color-secondary);
font-size: 14px;
font-weight: 400;
text-align: left;
line-height: 22px;
}
.dialog-body .img-wrapper img {
vertical-align: bottom;
width: 100%;
}
</style>
`;

export default function DialogBody() {
useEffect(() => {
// 添加示例代码所需样式
document.head.insertAdjacentHTML('beforeend', classStyles);
}, []);

return (
<div className="dialog-body">
<img className="dialog-img" src="https://tdesign.gtimg.com/demo/demo-image-1.png" alt="demo" />
<div className="img-wrapper">
<img className="img" src="https://tdesign.gtimg.com/demo/demo-image-1.png" alt="demo" />
</div>
<p>此处显示本页引导的说明文案,可按需要撰写,如内容过多可折行显示。图文也可按需自由设计。</p>
</div>
);
Expand Down
55 changes: 0 additions & 55 deletions src/guide/_example/dialog.css

This file was deleted.

68 changes: 66 additions & 2 deletions src/guide/_example/dialog.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,73 @@
import React from 'react';
import React, { useEffect } from 'react';
import { Button, Drawer, Guide, Input, Row } from 'tdesign-react';
import './base.css';
import DialogBody from './dialog-body';

const classStyles = `
<style>
.guide-container {
max-width: 600px;
padding: 40px;
}
.title-major {
color: var(--td-text-color-primary);
font-size: 36px;
font-weight: 700;
line-height: 44px;
}
.title-sub {
margin-top: 8px;
color: var(--td-text-color-secondary);
font-size: 14px;
font-weight: 400;
line-height: 22px;
}
.field {
margin-top: 50px;
}
.label {
margin-bottom: 8px;
color: var(--td-text-color-primary);
font-size: 14px;
font-weight: 400;
line-height: 22px;
}
.action {
display: inline-flex;
margin-top: 50px;
}
.action button:first-child {
margin-right: 10px;
}
/* dialog body */
.dialog-img {
width: 100%;
}
p {
margin-top: 16px;
color: var(--td-text-color-secondary);
font-size: 14px;
font-weight: 400;
text-align: left;
line-height: 22px;
}
</style>
`;

export default function DialogGuide() {
useEffect(() => {
// 添加示例代码所需样式
document.head.insertAdjacentHTML('beforeend', classStyles);
}, []);

const steps = [
{
element: '.main-title-dialog',
Expand Down
Loading

0 comments on commit 2c8c013

Please sign in to comment.