-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: ashutosh16 <[email protected]> add actionmenut ext Signed-off-by: ashutosh16 <[email protected]> add actionmenut ext
- Loading branch information
ashutosh16
committed
Aug 21, 2024
1 parent
ec8626a
commit f9bb2bb
Showing
2 changed files
with
19 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" }] }, actionMenuExtensions: [<React.Fragment key={1}>render the custom component</React.Fragment>] }} /> | ||
)); |