Skip to content

Commit

Permalink
extract down icon into separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomEtc committed Oct 1, 2023
1 parent a94dd50 commit 51708ee
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 20 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
]
},
"devDependencies": {
"@parcel/transformer-inline-string": "2.8.3",
"@swc/helpers": "^0.4.14",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
Expand Down
26 changes: 6 additions & 20 deletions src/icons.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
import { html } from 'lit';
import {unsafeSVG} from 'lit-html/directives/unsafe-svg';
import down from 'bundle-text:./icons/down.svg';

export const downIcon = (w: number, h: number) => html`<svg
xmlns="http://www.w3.org/2000/svg"
focusable="false"
aria-hidden="true"
viewBox="0 0 17 15"
style="width: ${w}px; height: ${h}px; opacity: 0.5; fill: none; vertical-align: text-top;"
>
<path
d="M1.90137 1.92651L8.98672 7.62669C9.0241 7.65676 9.07756 7.65605 9.11413 7.62499L15.8241 1.92651"
stroke="black"
stroke-width="2"
stroke-linecap="round"
></path>
<path
d="M1.90137 7.67859L8.98672 13.3788C9.0241 13.4088 9.07756 13.4081 9.11413 13.3771L15.8241 7.67859"
stroke="black"
stroke-width="2"
stroke-linecap="round"
></path>
</svg>`;
export const downIcon = (w: number, h: number) => html`<div
style="width: ${w}px; height: ${h}px; opacity: 0.5; vertical-align: baseline; display: inline-block;">
${unsafeSVG(down)}
</div>`;

export const questionIcon = (w: number, h: number) => html`<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
20 changes: 20 additions & 0 deletions src/icons/down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,13 @@
"@parcel/workers" "2.8.3"
nullthrows "^1.1.1"

"@parcel/[email protected]":
version "2.8.3"
resolved "https://registry.yarnpkg.com/@parcel/transformer-inline-string/-/transformer-inline-string-2.8.3.tgz#693f13dd3d3f5f19c3af9389643328328496ace5"
integrity sha512-TBMk2H9nV8JMOsLztalhzS6HgthG5SCHKYkR2MaW7eSZuSGotbSP22aJip8HgQZ/lPMdOMb1lknHmd8WROxWHg==
dependencies:
"@parcel/plugin" "2.8.3"

"@parcel/[email protected]":
version "2.8.3"
resolved "https://registry.yarnpkg.com/@parcel/transformer-js/-/transformer-js-2.8.3.tgz#fe400df428394d1e7fe5afb6dea5c7c858e44f03"
Expand Down

0 comments on commit 51708ee

Please sign in to comment.