Переглянути джерело

feat: add new compoennt icon of json viewer, #2583

point.halo 10 місяців тому
батько
коміт
fa2f3611c6

+ 46 - 0
packages/semi-icons-lab/src/icons/IconJsonViewer.tsx

@@ -0,0 +1,46 @@
+import * as React from 'react';
+import { convertIcon } from '../components/Icon';
+function SvgComponent(props: React.SVGProps<SVGSVGElement>) {
+    return (
+        <svg
+            viewBox="0 0 24 24"
+            fill="none"
+            xmlns="http://www.w3.org/2000/svg"
+            width="1em"
+            height="1em"
+            focusable={false}
+            aria-hidden={true}
+            {...props}
+        >
+            <path d="M2 5a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V5Z" fill="#DDE3E8" />
+            <path
+                fillRule="evenodd"
+                clipRule="evenodd"
+                d="M12.16 4.98a.87.87 0 1 0-1.74-.21L9.26 14.1a.88.88 0 0 0 1.73.22l1.17-9.34Zm.85 1.03a.87.87 0 0 1 1.23 0l2.92 2.91c.34.34.34.9 0 1.24l-2.92 2.92a.87.87 0 1 1-1.23-1.24l2.3-2.3-2.3-2.3a.88.88 0 0 1 0-1.23Z"
+                fill="#AAB2BF"
+            />
+            <path
+                fillRule="evenodd"
+                clipRule="evenodd"
+                d="M13 6a.87.87 0 0 1 1.24 0l2.92 2.92c.34.34.34.9 0 1.24l-2.92 2.92a.87.87 0 1 1-1.23-1.24l2.3-2.3-2.3-2.3a.88.88 0 0 1 0-1.23Z"
+                fill="#4CC3FA"
+            />
+            <path
+                fillRule="evenodd"
+                clipRule="evenodd"
+                d="M8.41 6a.88.88 0 0 0-1.24 0L4.26 8.93a.88.88 0 0 0 0 1.24l2.91 2.92a.88.88 0 1 0 1.24-1.24l-2.3-2.3 2.3-2.3a.88.88 0 0 0 0-1.23Z"
+                fill="#FBCD2C"
+            />
+            <path
+                d="m18.46 11.62 2.91 2.92 1.22-1.22c.46-.45.46-1.19 0-1.65l-1.27-1.26a1.17 1.17 0 0 0-1.64 0l-1.22 1.21Z"
+                fill="#6A6F7F"
+            />
+            <path
+                d="m11.31 21.33.98-3.43c.03-.1.08-.19.15-.26l5.14-5.14 2.92 2.92-5.14 5.14a.58.58 0 0 1-.26.15l-3.43.98a.3.3 0 0 1-.36-.36Z"
+                fill="#6A6F7F"
+            />
+        </svg>
+    );
+}
+const IconComponent = convertIcon(SvgComponent, 'json-viewer');
+export default IconComponent;

+ 1 - 0
packages/semi-icons-lab/src/icons/index.ts

@@ -38,6 +38,7 @@ export { default as IconImage } from './IconImage';
 export { default as IconInputNumber } from './IconInputNumber';
 export { default as IconInput } from './IconInput';
 export { default as IconIntro } from './IconIntro';
+export { default as IconJsonViewer } from './IconJsonViewer';
 export { default as IconLayout } from './IconLayout';
 export { default as IconList } from './IconList';
 export { default as IconLocaleProvider } from './IconLocaleProvider';

+ 8 - 0
packages/semi-icons-lab/src/svgs/json-viewer.svg

@@ -0,0 +1,8 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M2 5C2 3.34315 3.34315 2 5 2H17C18.6569 2 20 3.34315 20 5V15C20 16.6569 18.6569 18 17 18H5C3.34315 18 2 16.6569 2 15V5Z" fill="#DDE3E8"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M12.1599 4.98362C12.2199 4.50411 11.8797 4.06679 11.4002 4.00685C10.9207 3.94691 10.4834 4.28704 10.4235 4.76656L9.25679 14.0999C9.19685 14.5794 9.53698 15.0167 10.0165 15.0767C10.496 15.1366 10.9333 14.7965 10.9933 14.317L12.1599 4.98362ZM13.0063 6.00637C13.348 5.66466 13.902 5.66466 14.2437 6.00637L17.1604 8.92304C17.5021 9.26475 17.5021 9.81877 17.1604 10.1605L14.2437 13.0771C13.902 13.4189 13.348 13.4189 13.0063 13.0771C12.6646 12.7354 12.6646 12.1814 13.0063 11.8397L15.3042 9.54176L13.0063 7.24381C12.6646 6.9021 12.6646 6.34808 13.0063 6.00637Z" fill="#AAB2BF"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M13.0063 6.00628C13.348 5.66457 13.902 5.66457 14.2437 6.00628L17.1604 8.92295C17.5021 9.26466 17.5021 9.81868 17.1604 10.1604L14.2437 13.0771C13.902 13.4188 13.348 13.4188 13.0063 13.0771C12.6646 12.7353 12.6646 12.1813 13.0063 11.8396L15.3042 9.54167L13.0063 7.24372C12.6646 6.90201 12.6646 6.34799 13.0063 6.00628Z" fill="#4CC3FA"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M8.41041 6.00628C8.0687 5.66457 7.51468 5.66457 7.17297 6.00628L4.2563 8.92295C3.91459 9.26466 3.91459 9.81868 4.2563 10.1604L7.17297 13.0771C7.51468 13.4188 8.0687 13.4188 8.41041 13.0771C8.75211 12.7353 8.75211 12.1813 8.41041 11.8396L6.11246 9.54167L8.41041 7.24372C8.75211 6.90201 8.75211 6.34799 8.41041 6.00628Z" fill="#FBCD2C"/>
+<path d="M18.4583 11.6248L21.375 14.5415L22.5917 13.3248C23.0473 12.8692 23.0473 12.1305 22.5917 11.6749L21.325 10.4081C20.8693 9.9525 20.1307 9.9525 19.675 10.4081L18.4583 11.6248Z" fill="#6A6F7F"/>
+<path d="M11.3109 21.3284L12.2918 17.8952C12.319 17.7998 12.3701 17.713 12.4402 17.6429L17.5833 12.4998L20.5 15.4165L15.3569 20.5596C15.2868 20.6297 15.2 20.6808 15.1047 20.708L11.6715 21.6889C11.4514 21.7518 11.248 21.5484 11.3109 21.3284Z" fill="#6A6F7F"/>
+</svg>

+ 4 - 0
packages/semi-icons-lab/src/svgs/meta.json

@@ -45,6 +45,10 @@
     { "name": "input-number", "category": "Common" },
     { "name": "input", "category": "Common" },
     { "name": "intro", "category": "Common" },
+    {
+        "name": "json-viewer",
+        "category": "Common"
+    },
     { "name": "layout", "category": "Common" },
     { "name": "list", "category": "Common" },
     { "name": "locale-provider", "category": "Common" },