Skip to content

Commit e01f557

Browse files
committed
[FEAT]: Add new icon: PlayIcon
1 parent 9b3372c commit e01f557

File tree

5 files changed

+40
-7
lines changed

5 files changed

+40
-7
lines changed

src/components/icons/Cancel/Cancel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React,{ FC } from "react";
1+
import React, { FC } from "react";
22
import { parseSize } from "../utils/utils";
33
import { CancelProps } from "./CancelProps";
44

55
const Cancel: FC<CancelProps> = (props: CancelProps) => {
6-
const { size, color, colorFill, onClick, style,className } = props;
6+
const { size, color, colorFill, onClick, style, className } = props;
77
const finalSize = parseSize(size);
88
const finalStyle = style ? style : {};
99
return (
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import React, { FC } from "react";
2+
import { parseSize } from "../utils/utils";
3+
import { PlayIconProps } from "./PlayIconProps";
4+
5+
const PlayIcon: FC<PlayIconProps> = (props: PlayIconProps) => {
6+
const { size, color, colorFill, onClick, style, className } = props;
7+
const finalSize = parseSize(size);
8+
const finalStyle = style ? style : {};
9+
return (
10+
<svg
11+
className={className || ""}
12+
style={onClick ? { cursor: "pointer", ...finalStyle } : finalStyle}
13+
xmlns="http://www.w3.org/2000/svg"
14+
height={`${finalSize}px`}
15+
viewBox="0 0 24 24"
16+
width={`${finalSize}px`}
17+
fill={color ? color : "#000000"}
18+
onClick={(e) => onClick?.(e)}
19+
>
20+
<path
21+
d="M0 0h24v24H0V0z"
22+
opacity=".9"
23+
fill={colorFill ? colorFill : "none"}
24+
/>
25+
<path d="M8 5v14l11-7L8 5z" />
26+
</svg>
27+
);
28+
};
29+
export default PlayIcon;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import { IconProps } from "../IconProps/IconProps";
2+
export interface PlayIconProps extends IconProps { }

src/components/icons/Visibility/Visibility.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ import { VisibilityProps } from "./VisibilityProps";
55
const Visibility: FC<VisibilityProps> = (props: VisibilityProps) => {
66
const { size, color, colorFill, onClick, style, className } = props;
77
const finalSize = parseSize(size);
8-
let finalStyle = style ? style : {};
9-
8+
const finalStyle = style ? style : {};
9+
1010
return (
1111
<svg
12-
className={className || ""}
13-
style={onClick ? { cursor: "pointer",...finalStyle } : finalStyle}
12+
className={className || ""}
13+
style={onClick ? { cursor: "pointer", ...finalStyle } : finalStyle}
1414
xmlns="http://www.w3.org/2000/svg"
1515
height={`${finalSize}px`}
1616
viewBox="0 0 24 24"
1717
width={`${finalSize}px`}
1818
fill={color ? color : "#000000"}
19-
onClick={() => onClick?.()}
19+
onClick={(e) => onClick?.(e)}
2020
>
2121
<path d="M0 0h24v24H0V0z" fill="none" />
2222
<path

src/components/icons/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ export * from "./UploadError/UploadError";
3232
export { default as Clean } from "./Clean/Clean";
3333
export * from "./Clean/Clean";
3434

35+
export { default as PlayIcon } from "./Play/PlayIcon";
36+
export * from "./Play/PlayIcon";
3537

3638
export { default as UploadingProcess } from "./UploadingProcess/UploadingProcess";
3739
export * from "./UploadingProcess/UploadingProcess";

0 commit comments

Comments
 (0)