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 Drag Icon #11

Merged
merged 1 commit into from
Sep 25, 2020
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
80 changes: 80 additions & 0 deletions src/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,26 @@ exports[`With className array Icon Download 1`] = `
</div>
`;

exports[`With className array Icon Drag 1`] = `
<div>
<svg
class="w-4 text-black fill-current"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
>
<path
clip-rule="evenodd"
d="M7 4.5a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zM7 12a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm1.5 6a1.5 1.5 0 100 3 1.5 1.5 0 000-3zM14 4.5a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm1.5 6a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm-1.5 9a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z"
fill="currentColor"
fill-opacity="0.45"
fill-rule="evenodd"
/>
</svg>
</div>
`;

exports[`With className array Icon Edit 1`] = `
<div>
<svg
Expand Down Expand Up @@ -2401,6 +2421,26 @@ exports[`With className object Icon Download 1`] = `
</div>
`;

exports[`With className object Icon Drag 1`] = `
<div>
<svg
class="w-4 fill-current"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
>
<path
clip-rule="evenodd"
d="M7 4.5a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zM7 12a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm1.5 6a1.5 1.5 0 100 3 1.5 1.5 0 000-3zM14 4.5a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm1.5 6a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm-1.5 9a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z"
fill="currentColor"
fill-opacity="0.45"
fill-rule="evenodd"
/>
</svg>
</div>
`;

exports[`With className object Icon Edit 1`] = `
<div>
<svg
Expand Down Expand Up @@ -3967,6 +4007,26 @@ exports[`With className string Icon Download 1`] = `
</div>
`;

exports[`With className string Icon Drag 1`] = `
<div>
<svg
class="w-4 h-4 fill-current"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
>
<path
clip-rule="evenodd"
d="M7 4.5a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zM7 12a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm1.5 6a1.5 1.5 0 100 3 1.5 1.5 0 000-3zM14 4.5a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm1.5 6a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm-1.5 9a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z"
fill="currentColor"
fill-opacity="0.45"
fill-rule="evenodd"
/>
</svg>
</div>
`;

exports[`With className string Icon Edit 1`] = `
<div>
<svg
Expand Down Expand Up @@ -5533,6 +5593,26 @@ exports[`Without className Icon Download 1`] = `
</div>
`;

exports[`Without className Icon Drag 1`] = `
<div>
<svg
class="fill-current"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
>
<path
clip-rule="evenodd"
d="M7 4.5a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zM7 12a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm1.5 6a1.5 1.5 0 100 3 1.5 1.5 0 000-3zM14 4.5a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm1.5 6a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm-1.5 9a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z"
fill="currentColor"
fill-opacity="0.45"
fill-rule="evenodd"
/>
</svg>
</div>
`;

exports[`Without className Icon Edit 1`] = `
<div>
<svg
Expand Down
22 changes: 22 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1279,3 +1279,25 @@ export function Forward(props: BaseProps): JSX.Element {
</svg>
);
}

export function Drag(props: BaseProps): JSX.Element {
const className = cx(props.className, 'fill-current');
return (
<svg
width={24}
height={24}
viewBox="0 0 24 24"
fill="none"
{...props}
className={className}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M7 4.5a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zM7 12a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm1.5 6a1.5 1.5 0 100 3 1.5 1.5 0 000-3zM14 4.5a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm1.5 6a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm-1.5 9a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z"
fill="currentColor"
fillOpacity={0.45}
/>
</svg>
);
}