Extract Barcode icon
This commit is contained in:
@@ -95,6 +95,141 @@ defmodule MusicLibraryWeb.BarcodeScannerComponent do
|
||||
"""
|
||||
end
|
||||
|
||||
attr :class, :string, required: true
|
||||
|
||||
def barcode_icon(assigns) do
|
||||
~H"""
|
||||
<svg
|
||||
class={@class}
|
||||
aria-hidden="true"
|
||||
data-slot="icon"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
version="1.1"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 256 256"
|
||||
xml:space="preserve"
|
||||
>
|
||||
<g
|
||||
style="stroke: none; stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
|
||||
transform="translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)"
|
||||
>
|
||||
<polygon
|
||||
points="90,79.14 56.12,79.14 56.12,73.14 84,73.14 84,54.67 90,54.67 "
|
||||
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
|
||||
transform=" matrix(1 0 0 1 0 0) "
|
||||
/>
|
||||
<polygon
|
||||
points="33.88,79.14 0,79.14 0,54.67 6,54.67 6,73.14 33.88,73.14 "
|
||||
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
|
||||
transform=" matrix(1 0 0 1 0 0) "
|
||||
/>
|
||||
<polygon
|
||||
points="6,35.33 0,35.33 0,10.86 33.88,10.86 33.88,16.86 6,16.86 "
|
||||
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
|
||||
transform=" matrix(1 0 0 1 0 0) "
|
||||
/>
|
||||
<polygon
|
||||
points="90,35.33 84,35.33 84,16.86 56.12,16.86 56.12,10.86 90,10.86 "
|
||||
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
|
||||
transform=" matrix(1 0 0 1 0 0) "
|
||||
/>
|
||||
<rect
|
||||
x="36.27"
|
||||
y="26.31"
|
||||
rx="0"
|
||||
ry="0"
|
||||
width="6"
|
||||
height="37.39"
|
||||
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
|
||||
transform=" matrix(1 0 0 1 0 0) "
|
||||
/>
|
||||
<rect
|
||||
x="13.36"
|
||||
y="26.31"
|
||||
rx="0"
|
||||
ry="0"
|
||||
width="6"
|
||||
height="37.39"
|
||||
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
|
||||
transform=" matrix(1 0 0 1 0 0) "
|
||||
/>
|
||||
<rect
|
||||
x="59.18"
|
||||
y="26.31"
|
||||
rx="0"
|
||||
ry="0"
|
||||
width="6"
|
||||
height="24.02"
|
||||
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
|
||||
transform=" matrix(1 0 0 1 0 0) "
|
||||
/>
|
||||
<rect
|
||||
x="59.18"
|
||||
y="56.85"
|
||||
rx="0"
|
||||
ry="0"
|
||||
width="6"
|
||||
height="6.84"
|
||||
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
|
||||
transform=" matrix(1 0 0 1 0 0) "
|
||||
/>
|
||||
<rect
|
||||
x="24.82"
|
||||
y="26.31"
|
||||
rx="0"
|
||||
ry="0"
|
||||
width="6"
|
||||
height="24.02"
|
||||
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
|
||||
transform=" matrix(1 0 0 1 0 0) "
|
||||
/>
|
||||
<rect
|
||||
x="24.82"
|
||||
y="56.85"
|
||||
rx="0"
|
||||
ry="0"
|
||||
width="6"
|
||||
height="6.84"
|
||||
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
|
||||
transform=" matrix(1 0 0 1 0 0) "
|
||||
/>
|
||||
<rect
|
||||
x="70.64"
|
||||
y="26.31"
|
||||
rx="0"
|
||||
ry="0"
|
||||
width="6"
|
||||
height="24.02"
|
||||
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
|
||||
transform=" matrix(1 0 0 1 0 0) "
|
||||
/>
|
||||
<rect
|
||||
x="70.64"
|
||||
y="56.85"
|
||||
rx="0"
|
||||
ry="0"
|
||||
width="6"
|
||||
height="6.84"
|
||||
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
|
||||
transform=" matrix(1 0 0 1 0 0) "
|
||||
/>
|
||||
<rect
|
||||
x="47.73"
|
||||
y="26.31"
|
||||
rx="0"
|
||||
ry="0"
|
||||
width="6"
|
||||
height="37.39"
|
||||
style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;"
|
||||
transform=" matrix(1 0 0 1 0 0) "
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
"""
|
||||
end
|
||||
|
||||
attr :scan_result, BarcodeScan.Result, required: true
|
||||
|
||||
defp scan_result(assigns) do
|
||||
|
||||
Reference in New Issue
Block a user