Skip to content

Commit

Permalink
Add arrow right (#4)
Browse files Browse the repository at this point in the history
* Add ArrowRight Icon

* Fix code format

* Fix tests
  • Loading branch information
paulacamargo25 committed Jun 18, 2020
1 parent 08c6723 commit 77364af
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 0 deletions.
112 changes: 112 additions & 0 deletions src/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,34 @@ exports[`With className array Icon ArrowDown 1`] = `
</div>
`;

exports[`With className array Icon ArrowRight 1`] = `
<div>
<svg
class="w-4 text-black fill-current"
height="24px"
viewBox="0 0 24 24"
width="24px"
>
<g
fill="none"
fill-rule="evenodd"
stroke="none"
stroke-width="1"
>
<path
d="M0 0H24V24H0z"
/>
<path
d="M4.054 10.654H17.5c.003 0 .005-.005.003-.005L12.43 5.774a1.03 1.03 0 111.43-1.486l6.906 6.638a1.032 1.032 0 010 1.486l-6.944 6.673a1.027 1.027 0 01-1.458-.029 1.032 1.032 0 01.028-1.457l5.072-4.875c.002-.003 0-.005-.002-.005H4.03c-.549 0-.996-.429-1.03-.968a1.047 1.047 0 011.053-1.097z"
fill="currentColor"
fill-opacity="0.85"
fill-rule="nonzero"
/>
</g>
</svg>
</div>
`;

exports[`With className array Icon Bell 1`] = `
<div>
<svg
Expand Down Expand Up @@ -1515,6 +1543,34 @@ exports[`With className object Icon ArrowDown 1`] = `
</div>
`;

exports[`With className object Icon ArrowRight 1`] = `
<div>
<svg
class="w-4 fill-current"
height="24px"
viewBox="0 0 24 24"
width="24px"
>
<g
fill="none"
fill-rule="evenodd"
stroke="none"
stroke-width="1"
>
<path
d="M0 0H24V24H0z"
/>
<path
d="M4.054 10.654H17.5c.003 0 .005-.005.003-.005L12.43 5.774a1.03 1.03 0 111.43-1.486l6.906 6.638a1.032 1.032 0 010 1.486l-6.944 6.673a1.027 1.027 0 01-1.458-.029 1.032 1.032 0 01.028-1.457l5.072-4.875c.002-.003 0-.005-.002-.005H4.03c-.549 0-.996-.429-1.03-.968a1.047 1.047 0 011.053-1.097z"
fill="currentColor"
fill-opacity="0.85"
fill-rule="nonzero"
/>
</g>
</svg>
</div>
`;

exports[`With className object Icon Bell 1`] = `
<div>
<svg
Expand Down Expand Up @@ -2952,6 +3008,34 @@ exports[`With className string Icon ArrowDown 1`] = `
</div>
`;

exports[`With className string Icon ArrowRight 1`] = `
<div>
<svg
class="w-4 h-4 fill-current"
height="24px"
viewBox="0 0 24 24"
width="24px"
>
<g
fill="none"
fill-rule="evenodd"
stroke="none"
stroke-width="1"
>
<path
d="M0 0H24V24H0z"
/>
<path
d="M4.054 10.654H17.5c.003 0 .005-.005.003-.005L12.43 5.774a1.03 1.03 0 111.43-1.486l6.906 6.638a1.032 1.032 0 010 1.486l-6.944 6.673a1.027 1.027 0 01-1.458-.029 1.032 1.032 0 01.028-1.457l5.072-4.875c.002-.003 0-.005-.002-.005H4.03c-.549 0-.996-.429-1.03-.968a1.047 1.047 0 011.053-1.097z"
fill="currentColor"
fill-opacity="0.85"
fill-rule="nonzero"
/>
</g>
</svg>
</div>
`;

exports[`With className string Icon Bell 1`] = `
<div>
<svg
Expand Down Expand Up @@ -4389,6 +4473,34 @@ exports[`Without className Icon ArrowDown 1`] = `
</div>
`;

exports[`Without className Icon ArrowRight 1`] = `
<div>
<svg
class="fill-current"
height="24px"
viewBox="0 0 24 24"
width="24px"
>
<g
fill="none"
fill-rule="evenodd"
stroke="none"
stroke-width="1"
>
<path
d="M0 0H24V24H0z"
/>
<path
d="M4.054 10.654H17.5c.003 0 .005-.005.003-.005L12.43 5.774a1.03 1.03 0 111.43-1.486l6.906 6.638a1.032 1.032 0 010 1.486l-6.944 6.673a1.027 1.027 0 01-1.458-.029 1.032 1.032 0 01.028-1.457l5.072-4.875c.002-.003 0-.005-.002-.005H4.03c-.549 0-.996-.429-1.03-.968a1.047 1.047 0 011.053-1.097z"
fill="currentColor"
fill-opacity="0.85"
fill-rule="nonzero"
/>
</g>
</svg>
</div>
`;

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

export function ArrowRight(props: BaseProps): JSX.Element {
const className = cx(props.className, 'fill-current');
return (
<svg
width="24px"
height="24px"
viewBox="0 0 24 24"
{...props}
className={className}
>
<g stroke="none" strokeWidth={1} fill="none" fillRule="evenodd">
<path d="M0 0H24V24H0z" />
<path
d="M4.054 10.654H17.5c.003 0 .005-.005.003-.005L12.43 5.774a1.03 1.03 0 111.43-1.486l6.906 6.638a1.032 1.032 0 010 1.486l-6.944 6.673a1.027 1.027 0 01-1.458-.029 1.032 1.032 0 01.028-1.457l5.072-4.875c.002-.003 0-.005-.002-.005H4.03c-.549 0-.996-.429-1.03-.968a1.047 1.047 0 011.053-1.097z"
fillOpacity={0.85}
fill="currentColor"
fillRule="nonzero"
/>
</g>
</svg>
);
}

0 comments on commit 77364af

Please sign in to comment.