Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WRR-11059: update TabLayout storybook sample's icons #1773

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading