feat: added proper typings to icons and added thumbnail icon

confirmed support for svgs with multiple paths
pull/2765/head
William Grant 2 years ago
parent b59f1bf445
commit c301eace48

@ -64,6 +64,7 @@ export type SessionIconType =
| 'doubleCheckCircle'
| 'gallery'
| 'stop'
| 'thumbnail'
| 'timer00'
| 'timer05'
| 'timer10'
@ -81,7 +82,10 @@ export type SessionIconType =
export type SessionIconSize = 'tiny' | 'small' | 'medium' | 'large' | 'huge' | 'huge2' | 'max';
export const icons = {
export const icons: Record<
string,
{ path: string | Array<string>; viewBox: string; ratio: number }
> = {
addUser: {
path:
'M8.85,2.17c-1.73,0-3.12,1.4-3.12,3.12s1.4,3.12,3.12,3.12c1.73,0,3.13-1.4,3.13-3.12S10.58,2.17,8.85,2.17z M8.85,0.08c2.88,0,5.21,2.33,5.21,5.21s-2.33,5.21-5.21,5.21s-5.2-2.33-5.2-5.21C3.65,2.42,5.98,0.08,8.85,0.08z M20.83,5.29 c0.54,0,0.98,0.41,1.04,0.93l0.01,0.11v2.08h2.08c0.54,0,0.98,0.41,1.04,0.93v0.12c0,0.54-0.41,0.98-0.93,1.04l-0.11,0.01h-2.08 v2.08c0,0.58-0.47,1.04-1.04,1.04c-0.54,0-0.98-0.41-1.04-0.93l-0.01-0.11v-2.08h-2.08c-0.54,0-0.98-0.41-1.04-0.93l-0.01-0.11 c0-0.54,0.41-0.98,0.93-1.04l0.11-0.01h2.08V6.34C19.79,5.76,20.26,5.29,20.83,5.29z M12.5,12.58c2.8,0,5.09,2.21,5.2,4.99v0.22 v2.08c0,0.58-0.47,1.04-1.04,1.04c-0.54,0-0.98-0.41-1.04-0.93l-0.01-0.11v-2.08c0-1.67-1.3-3.03-2.95-3.12h-0.18H5.21 c-1.67,0-3.03,1.3-3.12,2.95v0.18v2.08c0,0.58-0.47,1.04-1.04,1.04c-0.54,0-0.98-0.41-1.04-0.93L0,19.88V17.8 c0-2.8,2.21-5.09,4.99-5.2h0.22h7.29V12.58z',
@ -473,6 +477,16 @@ export const icons = {
viewBox: '-1 -1 35 35',
ratio: 1,
},
thumbnail: {
path: [
'M34.915 23.8987L26.594 17.812C26.5393 17.7682 26.4714 17.7444 26.4014 17.7444C26.3313 17.7444 26.2634 17.7682 26.2087 17.812L18.748 23.9886C18.6905 24.0313 18.6207 24.0544 18.549 24.0544C18.4773 24.0544 18.4075 24.0313 18.35 23.9886L14.6003 20.9324C14.5468 20.8918 14.4814 20.8698 14.4141 20.8698C14.3469 20.8698 14.2815 20.8918 14.2279 20.9324L4.0706 28.1491C4.03144 28.1797 3.99959 28.2186 3.97737 28.263C3.95516 28.3075 3.94314 28.3563 3.94219 28.406V30.743C3.94549 30.9361 4.02366 31.1204 4.16022 31.257C4.29678 31.3935 4.48104 31.4717 4.67413 31.475H34.3115C34.5056 31.475 34.6918 31.3979 34.8291 31.2606C34.9663 31.1233 35.0434 30.9372 35.0434 30.743V24.1427C35.0447 24.0944 35.0335 24.0467 35.011 24.004C34.9885 23.9613 34.9555 23.925 34.915 23.8987Z',
'M11.0947 18.7492C12.6904 18.7492 13.984 17.4556 13.984 15.8599C13.984 14.2642 12.6904 12.9707 11.0947 12.9707C9.49902 12.9707 8.20546 14.2642 8.20546 15.8599C8.20546 17.4556 9.49902 18.7492 11.0947 18.7492Z',
'M40.3597 4.62408L8.19261 0.874467C7.77128 0.822682 7.34385 0.855312 6.93527 0.970455C6.52668 1.0856 6.14511 1.28095 5.81282 1.54511C5.48052 1.80927 5.20415 2.13696 4.99984 2.50905C4.79552 2.88115 4.66734 3.2902 4.62277 3.71236L4.46868 5.0992H7.03691L7.16532 4.00771C7.17565 3.92437 7.20256 3.84394 7.24446 3.77116C7.28637 3.69838 7.34241 3.63473 7.4093 3.58395C7.51881 3.496 7.65413 3.44638 7.79454 3.4427H7.85874L22.1509 5.0992H35.6855C36.4753 5.10365 37.2535 5.29018 37.9595 5.64429C38.6655 5.99841 39.2803 6.51056 39.7561 7.14095H40.0643C40.2326 7.16031 40.3865 7.24541 40.4923 7.37771C40.5981 7.51 40.6474 7.67876 40.6293 7.84721L40.5395 8.57915C40.7184 9.09576 40.8138 9.63762 40.822 10.1843V28.4958L43.1847 8.18108C43.2788 7.33533 43.0345 6.48672 42.5053 5.82036C41.976 5.154 41.2048 4.72397 40.3597 4.62408Z',
'M35.6855 35.3016H3.30013C2.44871 35.3016 1.63216 34.9634 1.03011 34.3613C0.428069 33.7593 0.0898438 32.9427 0.0898438 32.0913V10.2614C0.0898438 9.40994 0.428069 8.59339 1.03011 7.99135C1.63216 7.3893 2.44871 7.05108 3.30013 7.05108H35.6855C36.5369 7.05108 37.3535 7.3893 37.9555 7.99135C38.5576 8.59339 38.8958 9.40994 38.8958 10.2614V32.0913C38.8958 32.9427 38.5576 33.7593 37.9555 34.3613C37.3535 34.9634 36.5369 35.3016 35.6855 35.3016ZM3.30013 9.59363C3.12985 9.59363 2.96654 9.66127 2.84613 9.78168C2.72572 9.90209 2.65807 10.0654 2.65807 10.2357V32.0656C2.65807 32.2359 2.72572 32.3992 2.84613 32.5196C2.96654 32.64 3.12985 32.7077 3.30013 32.7077H35.6855C35.8558 32.7077 36.0191 32.64 36.1395 32.5196C36.2599 32.3992 36.3276 32.2359 36.3276 32.0656V10.2357C36.3276 10.0654 36.2599 9.90209 36.1395 9.78168C36.0191 9.66127 35.8558 9.59363 35.6855 9.59363H3.30013Z',
],
viewBox: '0 0 44 36',
ratio: 1,
},
timer00: {
path:
'M11.428367,3.44328115 L10.5587469,3.94535651 C10.4906607,3.79477198 10.4145019,3.64614153 10.330127,3.5 C10.2457522,3.35385847 10.1551138,3.21358774 10.0587469,3.07933111 L10.928367,2.57725574 C11.0225793,2.71323387 11.1119641,2.85418158 11.1961524,3 C11.2803407,3.14581842 11.3577126,3.2937018 11.428367,3.44328115 Z M9.42274426,1.07163304 L8.92066889,1.94125309 C8.78641226,1.84488615 8.64614153,1.75424783 8.5,1.66987298 C8.35385847,1.58549813 8.20522802,1.50933927 8.05464349,1.44125309 L8.55671885,0.571633044 C8.7062982,0.642287382 8.85418158,0.719659271 9,0.803847577 C9.14581842,0.888035884 9.28676613,0.977420696 9.42274426,1.07163304 Z M11.9794631,6.5 L10.9753124,6.5 C10.9916403,6.33554688 11,6.1687497 11,6 C11,5.8312503 10.9916403,5.66445312 10.9753124,5.5 L11.9794631,5.5 C11.9930643,5.66486669 12,5.83162339 12,6 C12,6.16837661 11.9930643,6.33513331 11.9794631,6.5 Z M10.928367,9.42274426 L10.0587469,8.92066889 C10.1551138,8.78641226 10.2457522,8.64614153 10.330127,8.5 C10.4145019,8.35385847 10.4906607,8.20522802 10.5587469,8.05464349 L11.428367,8.55671885 C11.3577126,8.7062982 11.2803407,8.85418158 11.1961524,9 C11.1119641,9.14581842 11.0225793,9.28676613 10.928367,9.42274426 Z M8.55671885,11.428367 L8.05464349,10.5587469 C8.20522802,10.4906607 8.35385847,10.4145019 8.5,10.330127 C8.64614153,10.2457522 8.78641226,10.1551138 8.92066889,10.0587469 L9.42274426,10.928367 C9.28676613,11.0225793 9.14581842,11.1119641 9,11.1961524 C8.85418158,11.2803407 8.7062982,11.3577126 8.55671885,11.428367 Z M2.57725574,10.928367 L3.07933111,10.0587469 C3.21358774,10.1551138 3.35385847,10.2457522 3.5,10.330127 C3.64614153,10.4145019 3.79477198,10.4906607 3.94535651,10.5587469 L3.44328115,11.428367 C3.2937018,11.3577126 3.14581842,11.2803407 3,11.1961524 C2.85418158,11.1119641 2.71323387,11.0225793 2.57725574,10.928367 Z M5.5,11.9794631 L5.5,10.9753124 C5.66445312,10.9916403 5.8312503,11 6,11 C6.1687497,11 6.33554688,10.9916403 6.5,10.9753124 L6.5,11.9794631 C6.33513331,11.9930643 6.16837661,12 6,12 C5.83162339,12 5.66486669,11.9930643 5.5,11.9794631 Z M0.571633044,8.55671885 L1.44125309,8.05464349 C1.50933927,8.20522802 1.58549813,8.35385847 1.66987298,8.5 C1.75424783,8.64614153 1.84488615,8.78641226 1.94125309,8.92066889 L1.07163304,9.42274426 C0.977420696,9.28676613 0.888035884,9.14581842 0.803847577,9 C0.719659271,8.85418158 0.642287382,8.7062982 0.571633044,8.55671885 Z M0.0205368885,5.5 L1.02468762,5.5 C1.00835972,5.66445312 1,5.8312503 1,6 C1,6.1687497 1.00835972,6.33554688 1.02468762,6.5 L0.0205368885,6.5 C0.00693566443,6.33513331 -9.95062878e-13,6.16837661 -9.95093808e-13,6 C-9.95124738e-13,5.83162339 0.00693566443,5.66486669 0.0205368885,5.5 Z M1.07163304,2.57725574 L1.94125309,3.07933111 C1.84488615,3.21358774 1.75424783,3.35385847 1.66987298,3.5 C1.58549813,3.64614153 1.50933927,3.79477198 1.44125309,3.94535651 L0.571633044,3.44328115 C0.642287382,3.2937018 0.719659271,3.14581842 0.803847577,3 C0.888035884,2.85418158 0.977420696,2.71323387 1.07163304,2.57725574 Z M3.44328115,0.571633044 L3.94535651,1.44125309 C3.79477198,1.50933927 3.64614153,1.58549813 3.5,1.66987298 C3.35385847,1.75424783 3.21358774,1.84488615 3.07933111,1.94125309 L2.57725574,1.07163304 C2.71323387,0.977420696 2.85418158,0.888035884 3,0.803847577 C3.14581842,0.719659271 3.2937018,0.642287382 3.44328115,0.571633044 Z M6.5,0.0205368885 L6.5,7 L5.5,7 L5.5,0.0205368885 C5.66486669,0.00693566443 5.83162339,5.01e-14 6,5.01e-14 C6.16837661,5.01e-14 6.33513331,0.00693566443 6.5,0.0205368885 Z',

Loading…
Cancel
Save