Skip to content

Commit

Permalink
add toolbar ext
Browse files Browse the repository at this point in the history
Signed-off-by: ashutosh16 <[email protected]>
  • Loading branch information
ashutosh16 committed Aug 21, 2024
1 parent d8ab0e6 commit ea0a3c5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions stories/top-bar.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { storiesOf } from '@storybook/react';
import * as React from 'react';
import { TopBar } from '../src/components/top-bar/top-bar';


storiesOf('TopBar', module)
.add('basic tabs', () => (
<TopBar title='My Title' toolbar={{}} />
))
.add('with actions menu', () => (
<TopBar title='My Title' toolbar={{ actionMenu: { items: [{ action: () => alert(' here' ), title: "click here" }] } }} />
))
.add('with extension menu', () => (
<TopBar title='My Title' toolbar={{ actionMenu: { items: [{ action: () => alert(' here' ), title: "click here" }] }, toolBarExtensions: [<React.Fragment key={1}>render the custom component</React.Fragment>] }} />
));

0 comments on commit ea0a3c5

Please sign in to comment.