Skip to content

Commit c248192

Browse files
committed
split iconlist to instrcution icon and scenario icon list
1 parent ef5b712 commit c248192

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed
-1.4 KB
Binary file not shown.

manager-dashboard/app/utils/common.tsx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import { IconType } from 'react-icons';
3333
import oneTapIcon from '#resources/icons/1_Tap_Black.png';
3434
import twoTapIcon from '#resources/icons/2_Tap_Black.png';
3535
import threeTapIcon from '#resources/icons/3_Tap_Black.png';
36-
import tapIcon from '#resources/icons/tap_icon.png';
3736
import angularTapIcon from '#resources/icons/tap_icon_angular.png';
3837
import swipeIcon from '#resources/icons/swipeleft_icon_black.png';
3938

@@ -148,11 +147,6 @@ export const iconList: IconItem[] = [
148147
label: 'Ban',
149148
component: IoBanOutline,
150149
},
151-
{
152-
key: 'check',
153-
label: 'Check',
154-
component: IoCheckmarkOutline,
155-
},
156150
{
157151
key: 'close-outline',
158152
label: 'Close',
@@ -263,11 +257,9 @@ export const iconList: IconItem[] = [
263257
label: 'Warning',
264258
component: IoWarningOutline,
265259
},
266-
{
267-
key: 'general-tap',
268-
label: 'General Tap',
269-
component: getPngIcon(tapIcon, 'general tap'),
270-
},
260+
];
261+
262+
const instructionsIconList: IconItem[] = [
271263
{
272264
key: 'tap',
273265
label: 'Tap',
@@ -293,10 +285,17 @@ export const iconList: IconItem[] = [
293285
label: 'Swipe Left',
294286
component: getPngIcon(swipeIcon, 'swipe left'),
295287
},
288+
{
289+
key: 'check',
290+
label: 'Check',
291+
component: IoCheckmarkOutline,
292+
},
296293
];
297294

295+
export const combinedIconList = [...instructionsIconList, ...iconList];
296+
298297
export const iconMap = listToMap(
299-
iconList,
298+
combinedIconList,
300299
(icon) => icon.key,
301300
(icon) => icon.component,
302301
);

manager-dashboard/app/views/NewTutorial/ScenarioPageInput/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
getErrorObject,
88
} from '@togglecorp/toggle-form';
99
import {
10-
iconList,
10+
combinedIconList,
1111
valueSelector,
1212
labelSelector,
1313
keySelector,
@@ -205,7 +205,7 @@ export default function ScenarioPageInput(props: Props) {
205205
name="icon"
206206
label="Icon"
207207
value={value.instructions?.icon}
208-
options={iconList}
208+
options={combinedIconList}
209209
keySelector={keySelector}
210210
labelSelector={labelSelector}
211211
onChange={handleInstructionFieldChange}
@@ -241,7 +241,7 @@ export default function ScenarioPageInput(props: Props) {
241241
name="icon"
242242
label="Icon"
243243
value={value.hint?.icon}
244-
options={iconList}
244+
options={combinedIconList}
245245
keySelector={keySelector}
246246
labelSelector={labelSelector}
247247
onChange={handleHintFieldChange}
@@ -279,7 +279,7 @@ export default function ScenarioPageInput(props: Props) {
279279
name="icon"
280280
label="Icon"
281281
value={value.success?.icon}
282-
options={iconList}
282+
options={combinedIconList}
283283
keySelector={keySelector}
284284
labelSelector={labelSelector}
285285
onChange={handleSuccessFieldChange}

0 commit comments

Comments
 (0)