Browse Source

chore(free-demo): replace tools icon of pad & mouse

liuyangxing 10 months ago
parent
commit
16df4a29b7

+ 2 - 0
apps/demo-free-layout/src/assets/icon-mouse.tsx

@@ -18,3 +18,5 @@ export function MouseIcon(props: { width?: number; height?: number }) {
     </svg>
   );
 }
+
+export const MouseToolIcon = () =><svg  width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 8C4.5 4.13401 7.63401 1 11.5 1H12.5C16.366 1 19.5 4.13401 19.5 8V17C19.5 20.3137 16.8137 23 13.5 23H10.5C7.18629 23 4.5 20.3137 4.5 17V8ZM11.2517 3.00606C8.60561 3.13547 6.5 5.32184 6.5 8V17C6.5 19.2091 8.29086 21 10.5 21H13.5C15.7091 21 17.5 19.2091 17.5 17V8C17.5 5.32297 15.3962 3.13732 12.7517 3.00622V5.28013C13.2606 5.54331 13.6074 6.06549 13.6074 6.66669V8.75759C13.6074 9.35879 13.2606 9.88097 12.7517 10.1441V11.4091C12.7517 11.8233 12.4159 12.1591 12.0017 12.1591C11.5875 12.1591 11.2517 11.8233 11.2517 11.4091V10.1457C10.7411 9.88298 10.3931 9.35994 10.3931 8.75759V6.66669C10.3931 6.06433 10.7411 5.5413 11.2517 5.27862V3.00606ZM12.0017 6.14397C11.7059 6.14397 11.466 6.38381 11.466 6.67968V8.74462C11.466 9.03907 11.7036 9.27804 11.9975 9.28031L12.0002 9.28032C12.0456 9.28032 12.0896 9.27482 12.1316 9.26447C12.3401 9.21256 12.5002 9.0386 12.5318 8.82287C12.5345 8.80149 12.5359 8.7797 12.5359 8.75759V6.66669C12.5359 6.64463 12.5345 6.62288 12.5318 6.60154C12.4999 6.38354 12.3368 6.20817 12.1252 6.15826C12.0856 6.14891 12.0442 6.14397 12.0017 6.14397Z"></path></svg>

+ 2 - 0
apps/demo-free-layout/src/assets/icon-pad.tsx

@@ -28,3 +28,5 @@ export function PadIcon(props: { width?: number; height?: number }) {
     </svg>
   );
 }
+
+export const PadToolIcon = () => <svg  width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M20.8549 5H3.1451C3.06496 5 3 5.06496 3 5.1451V18.8549C3 18.935 3.06496 19 3.1451 19H20.8549C20.935 19 21 18.935 21 18.8549V5.1451C21 5.06496 20.935 5 20.8549 5ZM3.1451 3C1.96039 3 1 3.96039 1 5.1451V18.8549C1 20.0396 1.96039 21 3.1451 21H20.8549C22.0396 21 23 20.0396 23 18.8549V5.1451C23 3.96039 22.0396 3 20.8549 3H3.1451Z"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M6.99991 16C6.99991 15.4477 7.44762 15 7.99991 15H15.9999C16.5522 15 16.9999 15.4477 16.9999 16C16.9999 16.5523 16.5522 17 15.9999 17H7.99991C7.44762 17 6.99991 16.5523 6.99991 16Z"></path></svg>

+ 2 - 2
apps/demo-free-layout/src/components/tools/interactive.tsx

@@ -71,8 +71,8 @@ export const Interactive = () => {
             onPopupVisibleChange={setShowInteractivePanel}
             containerStyle={{
               border: 'none',
-              height: '24px',
-              width: '38px',
+              height: '32px',
+              width: '32px',
               justifyContent: 'center',
               alignItems: 'center',
               gap: '2px',

+ 3 - 3
apps/demo-free-layout/src/components/tools/mouse-pad-selector.tsx

@@ -2,8 +2,8 @@ import React, { type CSSProperties, useState } from 'react';
 
 import { Popover, Typography } from '@douyinfe/semi-ui';
 
-import { PadIcon } from '../../assets/icon-pad';
-import { MouseIcon } from '../../assets/icon-mouse';
+import { PadIcon, PadToolIcon } from '../../assets/icon-pad';
+import { MouseIcon, MouseToolIcon } from '../../assets/icon-mouse';
 
 import './mouse-pad-selector.less';
 
@@ -109,7 +109,7 @@ export const MousePadSelector: React.FC<
         style={containerStyle}
       >
         <div className={'ui-mouse-pad-selector-icon'} style={iconStyle}>
-          {isMouse ? <MouseIcon width={15} height={20} /> : <PadIcon width={20} height={15} />}
+          {isMouse ? <MouseToolIcon /> : <PadToolIcon />}
         </div>
       </div>
     </Popover>