Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add download icon #332

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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";
Loading