11import image from '@sb/demoImages/Person.png' ;
22import type { Meta , StoryObj } from '@storybook/react' ;
3- import addIcon from '@ui5/webcomponents-icons/dist/add.js' ;
4- import searchIcon from '@ui5/webcomponents-icons/dist/search.js' ;
5- import { Avatar , Icon , Input , ListItemStandard , ShellBarItem } from '../index' ;
6- import { ShellBar } from './index' ;
3+ import menu2Icon from '@ui5/webcomponents-icons/dist/menu2.js' ;
4+ import navBackIcon from '@ui5/webcomponents-icons/dist/nav-back.js' ;
5+ import sysHelpIcon from '@ui5/webcomponents-icons/dist/sys-help.js' ;
6+ import { FlexBox } from '../../components/FlexBox/index.js' ;
7+ import { Button } from '../Button/index.js' ;
8+ import { Avatar , ShellBarItem , ShellBarSpacer } from '../index.js' ;
9+ import { Label } from '../Label/index.js' ;
10+ import { ShellBarSearch } from '../ShellBarSearch/index.js' ;
11+ import { Switch } from '../Switch/index.js' ;
12+ import { Tag } from '../Tag/index.js' ;
13+ import { Text } from '../Text/index.js' ;
14+ import { ShellBar } from './index.js' ;
715
816const meta = {
917 title : 'Layouts & Floorplans / ShellBar' ,
@@ -17,30 +25,124 @@ const meta = {
1725 startButton : { control : { disable : true } } ,
1826 } ,
1927 args : {
28+ primaryTitle : 'Shell Bar' ,
29+ notificationsCount : '10' ,
30+ showNotifications : true ,
2031 logo : < img src = "https://sap.github.io/ui5-webcomponents/images/sap-logo-svg.svg" alt = "SAP Logo" /> ,
2132 profile : (
2233 < Avatar >
23- < img src = { image } />
34+ < img src = { image } alt = "person-placeholder" />
2435 </ Avatar >
2536 ) ,
26- menuItems : (
27- < >
28- < ListItemStandard data-key = "1" text = "Menu Item 1" />
29- < ListItemStandard data-key = "2" text = "Menu Item 2" />
30- < ListItemStandard data-key = "3" text = "Menu Item 3" />
31- </ >
32- ) ,
33- searchField : < Input showClearIcon icon = { < Icon name = { searchIcon } /> } /> ,
34- notificationsCount : '10' ,
35- primaryTitle : 'Shell Bar' ,
36- secondaryTitle : 'Secondary Title' ,
37- showNotifications : true ,
38- showProductSwitch : true ,
39- children : < ShellBarItem count = "3" text = { 'ShellBarItem' } icon = { addIcon } /> ,
37+ startButton : < Button icon = { menu2Icon } tooltip = "Menu" accessibleName = "Menu" /> ,
38+ searchField : < ShellBarSearch showClearIcon placeholder = "Search Apps, Products" /> ,
39+ children : < ShellBarItem text = { 'Help' } icon = { sysHelpIcon } /> ,
4040 } ,
4141 tags : [ 'package:@ui5/webcomponents-fiori' ] ,
4242} satisfies Meta < typeof ShellBar > ;
4343export default meta ;
4444type Story = StoryObj < typeof meta > ;
4545
4646export const Default : Story = { } ;
47+
48+ export const AllFeatures : Story = {
49+ args : {
50+ showProductSwitch : true ,
51+ startButton : (
52+ < >
53+ < Button icon = { menu2Icon } tooltip = "Menu" accessibleName = "Menu" />
54+ < Button icon = { navBackIcon } tooltip = "Back" accessibleName = "Back" />
55+ </ >
56+ ) ,
57+ content : (
58+ < >
59+ < Tag design = "Set2" colorScheme = "7" >
60+ Trial
61+ </ Tag >
62+ < Text > 30 days remaining</ Text >
63+ < ShellBarSpacer />
64+ < FlexBox gap = "0 5px" alignItems = "Center" >
65+ < Switch />
66+ < Label > Try Beta Version</ Label >
67+ </ FlexBox >
68+ </ >
69+ ) ,
70+ } ,
71+ } ;
72+
73+ export const EmbeddedBackNavigation : Story = {
74+ args : {
75+ startButton : < Button icon = { navBackIcon } tooltip = "Back" accessibleName = "Back" /> ,
76+ } ,
77+ } ;
78+
79+ export const TrialExample : Story = {
80+ args : {
81+ content : (
82+ < >
83+ < Tag design = "Set2" colorScheme = "7" >
84+ Trial
85+ </ Tag >
86+ < Text > 30 days remaining</ Text >
87+ </ >
88+ ) ,
89+ } ,
90+ } ;
91+
92+ export const ProductiveInstances : Story = {
93+ args : {
94+ content : (
95+ < Tag design = "Set2" colorScheme = "10" >
96+ Region EMEA
97+ </ Tag >
98+ ) ,
99+ } ,
100+
101+ render ( args ) {
102+ return (
103+ < >
104+ < ShellBar { ...args } />
105+ < ShellBar
106+ { ...args }
107+ content = {
108+ < Tag design = "Set2" colorScheme = "10" >
109+ Region APJ
110+ </ Tag >
111+ }
112+ />
113+ </ >
114+ ) ;
115+ } ,
116+ } ;
117+
118+ export const NonProductiveInstances : Story = {
119+ args : {
120+ content : (
121+ < >
122+ < Tag design = "Set2" colorScheme = "8" >
123+ Q System
124+ </ Tag >
125+ < Text > Region EMEA</ Text >
126+ </ >
127+ ) ,
128+ } ,
129+
130+ render ( args ) {
131+ return (
132+ < >
133+ < ShellBar { ...args } />
134+ < ShellBar
135+ { ...args }
136+ content = {
137+ < >
138+ < Tag design = "Set2" colorScheme = "8" >
139+ Q System
140+ </ Tag >
141+ < Text > Region APJ</ Text >
142+ </ >
143+ }
144+ />
145+ </ >
146+ ) ;
147+ } ,
148+ } ;
0 commit comments