Skip to content

Commit

Permalink
add toolbar ext
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutosh16 committed Aug 21, 2024
1 parent 1f9589c commit b6bad4a
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 b6bad4a

Please sign in to comment.