Skip to content

Commit

Permalink
feat(js): update reset icon
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Feb 1, 2021
1 parent b828171 commit 2c953f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions packages/autocomplete-js/src/__tests__/autocomplete.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,15 @@ describe('autocomplete-js', () => {
>
<svg
class="aa-ResetIcon"
fill="currentColor"
height="20"
viewBox="0 0 20 20"
width="20"
>
<path
d="M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z"
fill="none"
clip-rule="evenodd"
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
fill-rule="evenodd"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.4"
/>
</svg>
</button>
Expand Down
9 changes: 3 additions & 6 deletions packages/autocomplete-js/src/components/ResetIcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,15 @@ export const ResetIcon: Component<{}, SVGSVGElement> = () => {
element.setAttribute('viewBox', '0 0 20 20');
element.setAttribute('width', '20');
element.setAttribute('height', '20');
element.setAttribute('fill', 'currentColor');

const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
path.setAttribute(
'd',
'M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z'
'M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z'
);
path.setAttribute('stroke', 'currentColor');
path.setAttribute('fill', 'none');
path.setAttribute('fill-rule', 'evenodd');
path.setAttribute('stroke-width', '1.4');
path.setAttribute('stroke-linecap', 'round');
path.setAttribute('stroke-linejoin', 'round');
path.setAttribute('clip-rule', 'evenodd');

element.appendChild(path);

Expand Down

0 comments on commit 2c953f6

Please sign in to comment.