Skip to content

Commit ee3dea7

Browse files
committed
Add share to header
1 parent 3cd0633 commit ee3dea7

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

src/components/EditorHeader/ControlPanel.jsx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
IconUndo,
1010
IconRedo,
1111
IconEdit,
12+
IconShareStroked,
1213
} from "@douyinfe/semi-icons";
1314
import { Link, useNavigate } from "react-router-dom";
1415
import icon from "../../assets/icon_dark_64.png";
@@ -1355,8 +1356,22 @@ export default function ControlPanel({
13551356

13561357
return (
13571358
<>
1358-
{layout.header && header()}
1359-
{layout.toolbar && toolbar()}
1359+
<div>
1360+
{layout.header && (
1361+
<div className="flex justify-between items-center me-7">
1362+
{header()}
1363+
<Button
1364+
type="primary"
1365+
className="text-base me-2 pe-6 ps-5 py-[18px] rounded-md"
1366+
size="default"
1367+
icon={<IconShareStroked />}
1368+
>
1369+
Share
1370+
</Button>
1371+
</div>
1372+
)}
1373+
{layout.toolbar && toolbar()}
1374+
</div>
13601375
<Modal
13611376
modal={modal}
13621377
exportData={exportData}
@@ -1579,7 +1594,7 @@ export default function ControlPanel({
15791594
width={54}
15801595
src={icon}
15811596
alt="logo"
1582-
className="ms-8 min-w-[54px]"
1597+
className="ms-7 min-w-[54px]"
15831598
/>
15841599
</Link>
15851600
<div className="ms-1 mt-1">

0 commit comments

Comments
 (0)