@@ -1,35 +1,40 @@
|
||||
type SvgNames = 'arrow-down' |
|
||||
'arrow' |
|
||||
'arrow-left' |
|
||||
'big-gear' |
|
||||
'camera' |
|
||||
'checkmark' |
|
||||
'chevron-down' |
|
||||
'dots-vertical' |
|
||||
'drag-grid' |
|
||||
'exclamation-circle' |
|
||||
'favicon' |
|
||||
'flag' |
|
||||
'fork' |
|
||||
'gear' |
|
||||
'lightbulb' |
|
||||
'logout' |
|
||||
'mac-cmd-key' |
|
||||
'pencil' |
|
||||
'plus' |
|
||||
'plus-circle' |
|
||||
'refresh' |
|
||||
'save' |
|
||||
'terminal' |
|
||||
'trash' |
|
||||
'x'
|
||||
type SvgNames =
|
||||
| 'arrow-down'
|
||||
| 'arrow'
|
||||
| 'arrow-left'
|
||||
| 'big-gear'
|
||||
| 'camera'
|
||||
| 'checkmark'
|
||||
| 'chevron-down'
|
||||
| 'dots-vertical'
|
||||
| 'drag-grid'
|
||||
| 'exclamation-circle'
|
||||
| 'favicon'
|
||||
| 'flag'
|
||||
| 'fork'
|
||||
| 'gear'
|
||||
| 'lightbulb'
|
||||
| 'logout'
|
||||
| 'mac-cmd-key'
|
||||
| 'pencil'
|
||||
| 'plus'
|
||||
| 'plus-circle'
|
||||
| 'refresh'
|
||||
| 'save'
|
||||
| 'terminal'
|
||||
| 'trash'
|
||||
| 'x'
|
||||
|
||||
const Svg = ({ name, className: className2 = '', strokeWidth = 2 }: {
|
||||
const Svg = ({
|
||||
name,
|
||||
className: className2 = '',
|
||||
strokeWidth = 2,
|
||||
}: {
|
||||
name: SvgNames
|
||||
className?: string
|
||||
strokeWidth?: number
|
||||
}) => {
|
||||
const svgs: {[name in SvgNames]: React.ReactElement} = {
|
||||
const svgs: { [name in SvgNames]: React.ReactElement } = {
|
||||
'arrow-down': (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -60,40 +65,33 @@ const Svg = ({ name, className: className2 = '', strokeWidth = 2 }: {
|
||||
/>
|
||||
</svg>
|
||||
),
|
||||
'camera': (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 21">
|
||||
camera: (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 21">
|
||||
<path
|
||||
d="M6 5H4C2.34315 5 1 6.34315 1 8V17C1 18.6569 2.34315 20 4 20H20C21.6569 20 23 18.6569 23 17V8C23 6.34315 21.6569 5 20 5H18"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"/>
|
||||
<circle
|
||||
cx="12"
|
||||
cy="11"
|
||||
r="5"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"/>
|
||||
strokeLinecap="round"
|
||||
/>
|
||||
<circle cx="12" cy="11" r="5" stroke="currentColor" strokeWidth="2" />
|
||||
<path
|
||||
d="M16 2.68641C14.8716 1.61443 13.5582 1 12.1563 1C10.6229 1 9.19532 1.7351 8 3"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"/>
|
||||
strokeLinecap="round"
|
||||
/>
|
||||
</svg>
|
||||
),
|
||||
checkmark: (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 20" fill="none">
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M10.3438 19.6875C15.7803 19.6875 20.1875 15.2803 20.1875 9.84375C20.1875 4.4072 15.7803 0 10.3438 0C4.9072 0 0.5 4.4072 0.5 9.84375C0.5 15.2803 4.9072 19.6875 10.3438 19.6875ZM15.3321 6.5547C15.6384 6.09517 15.5142 5.4743 15.0547 5.16795C14.5952 4.8616 13.9743 4.98577 13.6679 5.4453L9.34457 11.9304L7.20711 9.79289C6.81658 9.40237 6.18342 9.40237 5.79289 9.79289C5.40237 10.1834 5.40237 10.8166 5.79289 11.2071L8.79289 14.2071C9.00474 14.419 9.3004 14.5247 9.59854 14.4951C9.89667 14.4656 10.1659 14.304 10.3321 14.0547L15.3321 6.5547Z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
</svg>
|
||||
),
|
||||
'checkmark': (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 21 20"
|
||||
fill="none">
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M10.3438 19.6875C15.7803 19.6875 20.1875 15.2803 20.1875 9.84375C20.1875 4.4072 15.7803 0 10.3438 0C4.9072 0 0.5 4.4072 0.5 9.84375C0.5 15.2803 4.9072 19.6875 10.3438 19.6875ZM15.3321 6.5547C15.6384 6.09517 15.5142 5.4743 15.0547 5.16795C14.5952 4.8616 13.9743 4.98577 13.6679 5.4453L9.34457 11.9304L7.20711 9.79289C6.81658 9.40237 6.18342 9.40237 5.79289 9.79289C5.40237 10.1834 5.40237 10.8166 5.79289 11.2071L8.79289 14.2071C9.00474 14.419 9.3004 14.5247 9.59854 14.4951C9.89667 14.4656 10.1659 14.304 10.3321 14.0547L15.3321 6.5547Z"
|
||||
fill="currentColor"/>
|
||||
</svg>),
|
||||
'chevron-down': (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -325,12 +323,8 @@ const Svg = ({ name, className: className2 = '', strokeWidth = 2 }: {
|
||||
</svg>
|
||||
),
|
||||
'mac-cmd-key': (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 220 220"
|
||||
>
|
||||
<
|
||||
path
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 220 220">
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M57.254,121.064c-17.735,0-31.45,4.723-40.765,14.035c-19.39,19.391-19.39,50.943,0,70.334 C25.884,214.828,38.375,220,51.66,220c0,0,0,0,0,0c13.284,0,25.774-5.172,35.168-14.566c11.069-11.07,14.037-27.061,14.041-41.016 c0.001-3.531,0.017-10.09,0.017-10.09h18.227c0,0,0.016,6.559,0.018,10.09c0.004,13.955,2.971,29.945,14.041,41.016 C142.565,214.828,155.056,220,168.34,220c13.285,0,25.775-5.172,35.17-14.566c19.391-19.391,19.391-50.943,0-70.334 c-9.314-9.312-23.029-14.035-40.764-14.035c-3.602,0-10.346,0.02-10.346,0.02c0-0.932,0-22.178,0-22.178s6.744,0.029,10.346,0.029 c17.734,0,31.449-4.721,40.762-14.033c19.391-19.392,19.391-50.943,0.002-70.334C194.113,5.174,181.624,0,168.34,0 c-13.285,0-25.773,5.174-35.168,14.566c-10.67,10.672-13.812,25.914-14.029,39.498l-0.193,11.609H101.05l-0.192-11.609 c-0.217-13.584-3.359-28.826-14.03-39.498C77.434,5.174,64.944,0,51.66,0C38.376,0,25.886,5.174,16.49,14.568 C-2.899,33.959-2.899,65.51,16.491,84.902c9.314,9.313,23.028,14.033,40.762,14.033c3.601,0,10.346-0.029,10.346-0.029 s0,21.246,0,22.178C67.6,121.084,60.855,121.064,57.254,121.064z M154.328,35.587c3.727-3.726,8.683-5.779,13.954-5.779 s10.229,2.053,13.957,5.781c7.692,7.693,7.692,20.213-0.002,27.906c-3.384,3.385-10.327,5.248-19.549,5.248 c-4.6,0-14.107,0-14.107,0v-8.688C148.581,60.056,147.566,41.495,154.328,35.587z M148.581,159.945v-8.688c0,0,9.508,0,14.107,0 c9.222,0,16.165,1.863,19.549,5.248c7.694,7.693,7.694,20.213,0.002,27.906c-3.729,3.729-8.686,5.781-13.957,5.781 s-10.228-2.053-13.954-5.779C147.566,178.506,148.581,159.945,148.581,159.945z M93.75,93.75h32.5v32.5h-32.5V93.75z M57.312,68.743 c-9.222,0-16.165-1.863-19.549-5.248c-7.694-7.693-7.694-20.213-0.002-27.906c3.729-3.729,8.686-5.781,13.957-5.781 s10.228,2.053,13.954,5.779c6.762,5.908,5.747,24.469,5.747,24.469v8.688C71.419,68.743,61.911,68.743,57.312,68.743z M71.419,151.258v8.688c0,0,1.015,18.561-5.747,24.469c-3.727,3.727-8.683,5.779-13.954,5.779s-10.229-2.053-13.957-5.781 c-7.692-7.693-7.692-20.213,0.002-27.906c3.384-3.385,10.327-5.248,19.549-5.248C61.911,151.258,71.419,151.258,71.419,151.258z"
|
||||
/>
|
||||
@@ -382,15 +376,13 @@ const Svg = ({ name, className: className2 = '', strokeWidth = 2 }: {
|
||||
</svg>
|
||||
),
|
||||
refresh: (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 14 17"
|
||||
fill="none">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 17" fill="none">
|
||||
<path
|
||||
d="M13 9.9271C13 13.189 10.3137 15.8333 7 15.8333C3.68629 15.8333 1 13.189 1 9.9271C1 6.66517 3.68629 4.02085 7 4.02085C9 4.02085 10.986 4.99917 12 5.77084M12 5.77084L8.33333 7.08334M12 5.77084L10.6667 1.83334"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"/>
|
||||
strokeLinecap="round"
|
||||
/>
|
||||
</svg>
|
||||
),
|
||||
save: (
|
||||
|
||||
Reference in New Issue
Block a user