Skip to content

Commit d0cf9f1

Browse files
committed
Add png icons
1 parent 553aded commit d0cf9f1

File tree

6 files changed

+54
-1
lines changed

6 files changed

+54
-1
lines changed
2.07 KB
Loading
2.25 KB
Loading
2.27 KB
Loading
1.4 KB
Loading
1.77 KB
Loading
Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import React from 'react';
12
import {
23
IoAddOutline,
34
IoAlertOutline,
@@ -29,6 +30,12 @@ import {
2930
import { isDefined, listToMap } from '@togglecorp/fujs';
3031
import { IconType } from 'react-icons';
3132

33+
import oneTapIcon from '#resources/icons/1_Tap_Black.png';
34+
import twoTapIcon from '#resources/icons/2_Tap_Black.png';
35+
import threeTapIcon from '#resources/icons/3_Tap_Black.png';
36+
import tapIcon from '#resources/icons/tap_icon.png';
37+
import angularTapIcon from '#resources/icons/tap_icon_angular.png';
38+
3239
export function valueSelector<T>(item: { value: T }) {
3340
return item.value;
3441
}
@@ -90,14 +97,35 @@ export type IconKey = 'addOutline'
9097
| 'thumbsDownOutline'
9198
| 'thumbsUpOutline'
9299
| 'triangleOutline'
93-
| 'warningOutline';
100+
| 'warningOutline'
101+
| 'generalTap'
102+
| 'tap'
103+
| 'oneTap'
104+
| 'twoTap'
105+
| 'threeTap';
94106

95107
export interface IconItem {
96108
key: IconKey;
97109
label: string;
98110
component: IconType;
99111
}
100112

113+
function getPngIcon(src: string, alt: string) {
114+
const element = () => (
115+
<img
116+
src={src}
117+
alt={alt}
118+
style={{
119+
height: '1em',
120+
width: '1em',
121+
objectFit: 'contain',
122+
}}
123+
/>
124+
);
125+
126+
return element;
127+
}
128+
101129
export const iconList: IconItem[] = [
102130
{
103131
key: 'addOutline',
@@ -229,6 +257,31 @@ export const iconList: IconItem[] = [
229257
label: 'Warning',
230258
component: IoWarningOutline,
231259
},
260+
{
261+
key: 'generalTap',
262+
label: 'General Tap',
263+
component: getPngIcon(tapIcon, 'general tap'),
264+
},
265+
{
266+
key: 'tap',
267+
label: 'Tap',
268+
component: getPngIcon(angularTapIcon, 'tap'),
269+
},
270+
{
271+
key: 'oneTap',
272+
label: '1-Tap',
273+
component: getPngIcon(oneTapIcon, 'one tap'),
274+
},
275+
{
276+
key: 'twoTap',
277+
label: '2-Tap',
278+
component: getPngIcon(twoTapIcon, 'two tap'),
279+
},
280+
{
281+
key: 'threeTap',
282+
label: '3-Tap',
283+
component: getPngIcon(threeTapIcon, 'three tap'),
284+
},
232285
];
233286

234287
export const iconMap = listToMap(

0 commit comments

Comments
 (0)