Skip to content

Commit 85a7814

Browse files
committed
add ShellBarBranding example
1 parent 5e87a8a commit 85a7814

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

packages/main/src/webComponents/ShellBar/ShellBar.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { ArgTypes, Canvas, Description, Markdown, Meta } from '@storybook/blocks
55
import { ShellBarItem } from '../ShellBarItem/index';
66
import { ShellBarSpacer } from '../ShellBarSpacer/index';
77
import { ShellBarSearch } from '../ShellBarSearch/index';
8+
import { ShellBarBranding } from '../ShellBarBranding/index';
89
import * as ComponentStories from './ShellBar.stories';
910
import { excludePropsForAbstract } from '@sb/utils';
1011

@@ -87,6 +88,10 @@ const ShellBarComponent = () => {
8788
};
8889
```
8990

91+
### ShellBar with ShellBarBranding slot
92+
93+
<Canvas of={ComponentStories.ShellBarBrandingStory} />
94+
9095
<Markdown>{SubcomponentsSection}</Markdown>
9196

9297
## ShellBarItem
@@ -104,4 +109,9 @@ const ShellBarComponent = () => {
104109
<Description of={ShellBarSearch} />
105110
<ArgTypes hideHTMLPropsNote of={ShellBarSearch} />
106111

112+
## ShellBarBranding (experimental)
113+
114+
<Description of={ShellBarBranding} />
115+
<ArgTypes hideHTMLPropsNote of={ShellBarBranding} />
116+
107117
<Footer />

packages/main/src/webComponents/ShellBar/ShellBar.stories.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { FlexBox } from '../../components/FlexBox/index.js';
77
import { Button } from '../Button/index.js';
88
import { Avatar, ShellBarItem, ShellBarSpacer } from '../index.js';
99
import { Label } from '../Label/index.js';
10+
import { ShellBarBranding } from '../ShellBarBranding/index.js';
1011
import { ShellBarSearch } from '../ShellBarSearch/index.js';
1112
import { Switch } from '../Switch/index.js';
1213
import { Tag } from '../Tag/index.js';
@@ -146,3 +147,24 @@ export const NonProductiveInstances: Story = {
146147
);
147148
},
148149
};
150+
151+
export const ShellBarBrandingStory: Story = {
152+
name: 'with ShellBarBranding',
153+
args: {
154+
branding: (
155+
<ShellBarBranding
156+
logo={<img src="https://sap.github.io/ui5-webcomponents/images/sap-logo-svg.svg" alt="SAP Logo" />}
157+
href="https://sap.github.io/ui5-webcomponents-react/v2/?path=/docs/layouts-floorplans-shellbar--docs"
158+
target="_blank"
159+
onClick={(e) => {
160+
console.log('ShellBarBranding clicked', e);
161+
}}
162+
>
163+
ShellBar Branding
164+
</ShellBarBranding>
165+
),
166+
},
167+
render(args) {
168+
return <ShellBar {...args} />;
169+
},
170+
};

0 commit comments

Comments
 (0)