Skip to content

Commit

Permalink
add download icon
Browse files Browse the repository at this point in the history
  • Loading branch information
ukorvl committed Dec 23, 2024
1 parent 4d60195 commit abbf30f
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/components/icons/DownloadIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { FC } from "react";
import { IconProps } from "./types";
import { getPreparedSvgProps } from "./utils";
import { Svg } from "baseui/icon/styled-components";
import { COLORS } from "../../shared";

const DownloadIcon: FC<IconProps> = ({ title, ...props }) => {
const svgProps = getPreparedSvgProps(props);
return (
<Svg {...props} {...svgProps} viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
{title && <title>{title}</title>}
<path
fill="none"
d="M2 11.0014V14H14V11"
stroke={COLORS.gray50}
strokeWidth="1.33333"
strokeLinecap="square"
strokeLinejoin="round"
/>
<path
fill="none"
d="M11 6.66675L8 9.66675L5 6.66675"
stroke={COLORS.gray50}
strokeWidth="1.33333"
strokeLinecap="square"
strokeLinejoin="round"
/>
<path
fill="none"
d="M8 3L7.99967 9"
stroke={COLORS.gray50}
strokeWidth="1.33333"
strokeLinecap="square"
strokeLinejoin="round"
/>
</Svg>
);
};

export default DownloadIcon;
4 changes: 4 additions & 0 deletions src/components/icons/Icons.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import SeparatorIcon from "./SeparatorIcon";
import ArrowUpIcon from "./ArrowUpIcon";
import DotsIcon from "./DotsIcon";
import CheckmarkIcon from "./CheckmarkIcon";
import DownloadIcon from "./DownloadIcon";
import { useStyletron } from "baseui";

<Meta title="Media/Icons" component={HeartIcon} />
Expand Down Expand Up @@ -159,6 +160,9 @@ export const Template = ({ color, size, icon }) => {
<Story name="Checkmark" args={{ icon: <CheckmarkIcon /> }}>
{Template.bind({})}
</Story>
<Story name="Download" args={{ icon: <DownloadIcon /> }}>
{Template.bind({})}
</Story>
</Canvas>

<ArgsTable of={HeartIcon} />
Expand Down
1 change: 1 addition & 0 deletions src/components/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ export { default as ArrowUpIcon } from "./ArrowUpIcon";
export { default as DotsIcon } from "./DotsIcon";
export { default as CopyIcon } from "./CopyIcon";
export { default as CheckmarkIcon } from "./CheckmarkIcon";
export { default as DownloadIcon } from "./DownloadIcon";

export type { IconProps } from "./types";

0 comments on commit abbf30f

Please sign in to comment.