-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Layout component in lib-user (#6115)
* refactor to non-grid Layout * add responsiveness and dropdown to PageHeader
- Loading branch information
1 parent
32f4864
commit 4deea7e
Showing
6 changed files
with
317 additions
and
149 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
63 changes: 63 additions & 0 deletions
63
packages/lib-user/src/components/shared/Layout/Layout.stories.js
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,63 @@ | ||
import { Layer, Link, SettingsOption } from 'grommet-icons' | ||
|
||
import Layout from './Layout' | ||
import HeaderLink from '../HeaderLink' | ||
import ContentBox from '../ContentBox' | ||
import MainContent from '../MainContent' | ||
import HeaderToast from '../HeaderToast' | ||
import HeaderButton from '../HeaderButton' | ||
|
||
export default { | ||
title: 'Components / Shared / Layout', | ||
component: Layout | ||
} | ||
|
||
const pageContent = <MainContent /> | ||
|
||
export const Default = { | ||
args: { | ||
children: pageContent, | ||
primaryHeaderItem: ( | ||
<HeaderLink | ||
href={`https://www.zooniverse.org/users/zootester1`} | ||
label='back to profile' | ||
primaryItem={true} | ||
/> | ||
) | ||
} | ||
} | ||
|
||
export const WithGroupHeaderItems = { | ||
args: { | ||
children: pageContent, | ||
primaryHeaderItem: ( | ||
<HeaderLink | ||
href={`https://www.zooniverse.org/users/zootester1`} | ||
label='back to profile' | ||
primaryItem={true} | ||
/> | ||
), | ||
secondaryHeaderItems: [ | ||
<HeaderToast | ||
key='copy-join-link-toast' | ||
icon={<Link color='white' size='small' />} | ||
label='Copy Join Link' | ||
message='Join Link Copied!' | ||
textToCopy={`https://www.zooniverse.org/groups/1234?join_token=4321`} | ||
/>, | ||
<HeaderToast | ||
key='share-group-toast' | ||
icon={<Layer color='white' size='small' />} | ||
label='Share Group' | ||
message='Group Link Copied!' | ||
textToCopy={`https://www.zooniverse.org/groups/1234`} | ||
/>, | ||
<HeaderButton | ||
key='manage-group-button' | ||
icon={<SettingsOption color='white' size='small' />} | ||
label='Manage Group' | ||
onClick={() => alert('See the GroupModal Stories')} | ||
/> | ||
] | ||
} | ||
} |
Oops, something went wrong.