Quellcode durchsuchen

feat(icon): add double_chevron_left,double_chevron_right icons #260 (#341)

走鹃 vor 3 Jahren
Ursprung
Commit
bf853a8bda

+ 3 - 8
.codesandbox/examples/pr-story/src/App.jsx

@@ -1,7 +1,7 @@
 import React from "react";
 
 import { Button, Empty } from "@douyinfe/semi-ui";
-import { IconSemiLogo } from "@douyinfe/semi-icons";
+import { IconDoubleChevronLeft, IconDoubleChevronRight  } from "@douyinfe/semi-icons";
 import {
   IllustrationConstruction,
   IllustrationConstructionDark,
@@ -16,13 +16,8 @@ export default function App() {
   return (
     <div className="app">
       {/* ------- your code start ------- DON'T DELETE THIS LINE -------  */}
-      <Button icon={<IconSemiLogo />}>hello semi</Button>
-      <Empty
-        image={<IllustrationConstruction />}
-        darkModeImage={<IllustrationConstructionDark />}
-        title={"Write a demo about this pull request"}
-        description="Semi build on this PR"
-      />
+        <IconDoubleChevronLeft />
+        <IconDoubleChevronRight />
       {/* ------- your code end ------- DON'T DELETE THIS LINE ------- */}
     </div>
   );

+ 33 - 0
packages/semi-icons/src/icons/IconDoubleChevronLeft.tsx

@@ -0,0 +1,33 @@
+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
+                fillRule="evenodd"
+                clipRule="evenodd"
+                d="M12.6185 4.39653C13.1272 4.92524 13.1272 5.78245 12.6185 6.31116L7.14483 12L12.6185 17.6888C13.1272 18.2176 13.1272 19.0748 12.6185 19.6035C12.1098 20.1322 11.285 20.1322 10.7763 19.6035L4.38153 12.9573C3.87282 12.4286 3.87282 11.5714 4.38153 11.0427L10.7763 4.39653C11.285 3.86782 12.1098 3.86782 12.6185 4.39653Z"
+                fill="currentColor"
+            />
+            <path
+                fillRule="evenodd"
+                clipRule="evenodd"
+                d="M19.6185 4.39653C20.1272 4.92524 20.1272 5.78245 19.6185 6.31116L14.1448 12L19.6185 17.6888C20.1272 18.2176 20.1272 19.0748 19.6185 19.6035C19.1098 20.1322 18.285 20.1322 17.7763 19.6035L11.3815 12.9573C10.8728 12.4286 10.8728 11.5714 11.3815 11.0427L17.7763 4.39653C18.285 3.86782 19.1098 3.86782 19.6185 4.39653Z"
+                fill="currentColor"
+            />
+        </svg>
+    );
+}
+
+const IconComponent = convertIcon(SvgComponent, 'double_chevron_left');
+export default IconComponent;

+ 33 - 0
packages/semi-icons/src/icons/IconDoubleChevronRight.tsx

@@ -0,0 +1,33 @@
+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
+                fillRule="evenodd"
+                clipRule="evenodd"
+                d="M4.38153 4.39653C4.89024 3.86782 5.71502 3.86782 6.22373 4.39653L12.6185 11.0427C13.1272 11.5714 13.1272 12.4286 12.6185 12.9573L6.22373 19.6035C5.71502 20.1322 4.89024 20.1322 4.38153 19.6035C3.87282 19.0748 3.87282 18.2176 4.38153 17.6888L9.85517 12L4.38153 6.31116C3.87282 5.78245 3.87282 4.92524 4.38153 4.39653Z"
+                fill="currentColor"
+            />
+            <path
+                fillRule="evenodd"
+                clipRule="evenodd"
+                d="M11.3815 4.39653C11.8902 3.86782 12.715 3.86782 13.2237 4.39653L19.6185 11.0427C20.1272 11.5714 20.1272 12.4286 19.6185 12.9573L13.2237 19.6035C12.715 20.1322 11.8902 20.1322 11.3815 19.6035C10.8728 19.0748 10.8728 18.2176 11.3815 17.6888L16.8552 12L11.3815 6.31116C10.8728 5.78245 10.8728 4.92524 11.3815 4.39653Z"
+                fill="currentColor"
+            />
+        </svg>
+    );
+}
+
+const IconComponent = convertIcon(SvgComponent, 'double_chevron_right');
+export default IconComponent;

+ 3 - 1
packages/semi-icons/src/icons/index.ts

@@ -122,6 +122,8 @@ export { default as IconDisc } from './IconDisc';
 export { default as IconDislikeThumb } from './IconDislikeThumb';
 export { default as IconDivide } from './IconDivide';
 export { default as IconDongchediLogo } from './IconDongchediLogo';
+export { default as IconDoubleChevronLeft } from './IconDoubleChevronLeft';
+export { default as IconDoubleChevronRight } from './IconDoubleChevronRight';
 export { default as IconDownCircleStroked } from './IconDownCircleStroked';
 export { default as IconDownload } from './IconDownload';
 export { default as IconDownloadStroked } from './IconDownloadStroked';
@@ -431,4 +433,4 @@ export { default as IconWifi } from './IconWifi';
 export { default as IconWindowAdaptionStroked } from './IconWindowAdaptionStroked';
 export { default as IconWrench } from './IconWrench';
 export { default as IconXiguaLogo } from './IconXiguaLogo';
-export { default as IconYoutube } from './IconYoutube';
+export { default as IconYoutube } from './IconYoutube';

+ 1 - 0
packages/semi-icons/src/svgs/double_chevron_left.svg

@@ -0,0 +1 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.6185 4.39653C13.1272 4.92524 13.1272 5.78245 12.6185 6.31116L7.14483 12L12.6185 17.6888C13.1272 18.2176 13.1272 19.0748 12.6185 19.6035C12.1098 20.1322 11.285 20.1322 10.7763 19.6035L4.38153 12.9573C3.87282 12.4286 3.87282 11.5714 4.38153 11.0427L10.7763 4.39653C11.285 3.86782 12.1098 3.86782 12.6185 4.39653Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M19.6185 4.39653C20.1272 4.92524 20.1272 5.78245 19.6185 6.31116L14.1448 12L19.6185 17.6888C20.1272 18.2176 20.1272 19.0748 19.6185 19.6035C19.1098 20.1322 18.285 20.1322 17.7763 19.6035L11.3815 12.9573C10.8728 12.4286 10.8728 11.5714 11.3815 11.0427L17.7763 4.39653C18.285 3.86782 19.1098 3.86782 19.6185 4.39653Z" fill="black"/></svg>

+ 1 - 0
packages/semi-icons/src/svgs/double_chevron_right.svg

@@ -0,0 +1 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.38153 4.39653C4.89024 3.86782 5.71502 3.86782 6.22373 4.39653L12.6185 11.0427C13.1272 11.5714 13.1272 12.4286 12.6185 12.9573L6.22373 19.6035C5.71502 20.1322 4.89024 20.1322 4.38153 19.6035C3.87282 19.0748 3.87282 18.2176 4.38153 17.6888L9.85517 12L4.38153 6.31116C3.87282 5.78245 3.87282 4.92524 4.38153 4.39653Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11.3815 4.39653C11.8902 3.86782 12.715 3.86782 13.2237 4.39653L19.6185 11.0427C20.1272 11.5714 20.1272 12.4286 19.6185 12.9573L13.2237 19.6035C12.715 20.1322 11.8902 20.1322 11.3815 19.6035C10.8728 19.0748 10.8728 18.2176 11.3815 17.6888L16.8552 12L11.3815 6.31116C10.8728 5.78245 10.8728 4.92524 11.3815 4.39653Z" fill="black"/></svg>

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

@@ -95,6 +95,10 @@
         "name": "chevron_left",
         "category": "Arrow"
     },
+    {
+        "name": "double_chevron_left",
+        "category": "Arrow"
+    },
     {
         "name": "paperclip",
         "category": "Files&Folder"
@@ -167,6 +171,10 @@
         "name": "chevron_right",
         "category": "Arrow"
     },
+    {
+        "name": "double_chevron_right",
+        "category": "Arrow"
+    },
     {
         "name": "external_open",
         "category": "Writing"