Skip to content

Commit

Permalink
WRR-11059: update TabLayout storybook sample's icons (#1773)
Browse files Browse the repository at this point in the history
Enact-DCO-1.0-Signed-off-by: Seungcheon Baek (sc.baek@lge.com)

Co-authored-by: Seungcheon Baek <5037955+SeungcheonBaek@users.noreply.github.com>
  • Loading branch information
SkylerBaek and SkylerBaek authored Dec 12, 2024
1 parent 4e3182d commit 5b666e4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
23 changes: 23 additions & 0 deletions samples/sampler/stories/helper/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,27 @@ export const drawingIcons = [
'pen'
].sort();

export const tabIcons = [
'appscontents',
'bookmark',
'browser',
'closedcaption',
'folder',
'guide',
'heart',
'help',
'info',
'location',
'movies',
'music',
'network',
'notification',
'power',
'sound',
'speaker',
'star',
'support',
'timer'
].sort();

export default Object.keys(icons).sort();
8 changes: 4 additions & 4 deletions samples/sampler/stories/qa/TabLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {mergeComponentMetadata} from '@enact/storybook-utils';
import {range, select} from '@enact/storybook-utils/addons/controls';
import {Component, useState} from 'react';

import icons from '../helper/icons';
import {tabIcons} from '../helper/icons';

TabLayout.displayName = 'TabLayout';
const Config = mergeComponentMetadata('TabLayout', TabLayoutBase, TabLayout);
Expand Down Expand Up @@ -81,7 +81,7 @@ export const WithVariableNumberOfTabs = (args) => {
orientation={args['orientation']}
>
{Array.from({length: tabs}, (v, i) => (
<TabLayout.Tab title={`Tab ${i}`} icon={icons[i % icons.length]} key={`tab${i}`}>
<TabLayout.Tab title={`Tab ${i}`} icon={tabIcons[i % tabIcons.length]} key={`tab${i}`}>
<Scroller key={'view' + i}>
<Button>Tab {i} Top</Button>
<BodyText>
Expand Down Expand Up @@ -245,7 +245,7 @@ export const WithDisabledTabs = (args) => {
{Array.from({length: tabs}, (v, i) => (
<TabLayout.Tab
disabled={i % 2 === 1}
icon={icons[i % icons.length]}
icon={tabIcons[i % tabIcons.length]}
title={`Tab ${i}`}
key={`tab${i}`}
>
Expand Down Expand Up @@ -329,7 +329,7 @@ export const WithAllDisabledTabs = (args) => {
orientation={args['orientation']}
>
{Array.from({length: tabs}, (v, i) => (
<TabLayout.Tab disabled icon={icons[i % icons.length]} title={`Tab ${i}`} key={`tab${i}`}>
<TabLayout.Tab disabled icon={tabIcons[i % tabIcons.length]} title={`Tab ${i}`} key={`tab${i}`}>
<Scroller key={'view' + i}>
<Button>Tab {i} Top</Button>
<BodyText>
Expand Down

0 comments on commit 5b666e4

Please sign in to comment.