-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Topbar): remove previous context api, add examples
- Loading branch information
Showing
21 changed files
with
477 additions
and
219 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* eslint-disable jsx-a11y/anchor-is-valid */ | ||
import React from 'react'; | ||
import { | ||
Button, | ||
Icon, | ||
ListItem, | ||
Topbar, | ||
TopbarMobile, | ||
TopbarNav, | ||
TopbarRight, | ||
} from '@momentum-ui/react'; | ||
|
||
export default class TopbarBlue extends React.Component { | ||
render() { | ||
return ( | ||
<Topbar | ||
color='blue' | ||
brandAnchorElement={ | ||
<a | ||
href='javascript:void(0)' | ||
title='Momentum UI' | ||
> | ||
<Icon name='cisco-logo' /> | ||
</a> | ||
} | ||
> | ||
<TopbarNav> | ||
<ListItem>Develop</ListItem> | ||
<ListItem>Styles</ListItem> | ||
<ListItem>Layout</ListItem> | ||
<ListItem>Navigation</ListItem> | ||
</TopbarNav> | ||
<TopbarRight> | ||
<div className='md-top-bar__user' /> | ||
<div className='md-top-bar__logged-out'> | ||
<a href='javascript:void(0)'>Log In</a> | ||
<Button color='blue' ariaLabel='myAriaLabel'> | ||
Button | ||
</Button> | ||
</div> | ||
</TopbarRight> | ||
<TopbarMobile shouldCloseOnClick={false}> | ||
<a | ||
href='javascript:void(0)' | ||
title='Momentum UI' | ||
> | ||
<Icon name='cisco-logo' /> | ||
</a> | ||
<ListItem>Develop</ListItem> | ||
<ListItem>Styles</ListItem> | ||
<ListItem>Layout</ListItem> | ||
<ListItem>Navigation</ListItem> | ||
</TopbarMobile> | ||
</Topbar> | ||
); | ||
} | ||
} | ||
/* eslint-enable jsx-a11y/anchor-is-valid */ |
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,58 @@ | ||
/* eslint-disable jsx-a11y/anchor-is-valid */ | ||
import React from 'react'; | ||
import { | ||
Button, | ||
Icon, | ||
ListItem, | ||
Topbar, | ||
TopbarMobile, | ||
TopbarNav, | ||
TopbarRight, | ||
} from '@momentum-ui/react'; | ||
|
||
export default class TopbarDark extends React.Component { | ||
render() { | ||
return ( | ||
<Topbar | ||
color='dark' | ||
brandAnchorElement={ | ||
<a | ||
href='javascript:void(0)' | ||
title='Momentum UI' | ||
> | ||
<Icon name='cisco-logo' /> | ||
</a> | ||
} | ||
> | ||
<TopbarNav> | ||
<ListItem>Develop</ListItem> | ||
<ListItem>Styles</ListItem> | ||
<ListItem>Layout</ListItem> | ||
<ListItem>Navigation</ListItem> | ||
</TopbarNav> | ||
<TopbarRight> | ||
<div className='md-top-bar__user' /> | ||
<div className='md-top-bar__logged-out'> | ||
<a href='javascript:void(0)'>Log In</a> | ||
<Button color='blue' ariaLabel='myAriaLabel'> | ||
Button | ||
</Button> | ||
</div> | ||
</TopbarRight> | ||
<TopbarMobile shouldCloseOnClick={false}> | ||
<a | ||
href='javascript:void(0)' | ||
title='Momentum UI' | ||
> | ||
<Icon name='cisco-logo' /> | ||
</a> | ||
<ListItem>Develop</ListItem> | ||
<ListItem>Styles</ListItem> | ||
<ListItem>Layout</ListItem> | ||
<ListItem>Navigation</ListItem> | ||
</TopbarMobile> | ||
</Topbar> | ||
); | ||
} | ||
} | ||
/* eslint-enable jsx-a11y/anchor-is-valid */ |
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,22 @@ | ||
/* eslint-disable jsx-a11y/anchor-is-valid */ | ||
import React from 'react'; | ||
import { | ||
TopbarBlue, | ||
TopbarDark, | ||
TopbarLight, | ||
TopbarNoMiddle | ||
} from './index'; | ||
|
||
export default class TopbarKitchenSink extends React.Component { | ||
render() { | ||
return ( | ||
<React.Fragment> | ||
<TopbarBlue /> | ||
<TopbarDark /> | ||
<TopbarLight /> | ||
<TopbarNoMiddle /> | ||
</React.Fragment> | ||
); | ||
} | ||
} | ||
/* eslint-enable jsx-a11y/anchor-is-valid */ |
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,58 @@ | ||
/* eslint-disable jsx-a11y/anchor-is-valid */ | ||
import React from 'react'; | ||
import { | ||
Button, | ||
Icon, | ||
ListItem, | ||
Topbar, | ||
TopbarMobile, | ||
TopbarNav, | ||
TopbarRight, | ||
} from '@momentum-ui/react'; | ||
|
||
export default class TopbarLight extends React.Component { | ||
render() { | ||
return ( | ||
<Topbar | ||
color='light' | ||
brandAnchorElement={ | ||
<a | ||
href='javascript:void(0)' | ||
title='Momentum UI' | ||
> | ||
<Icon name='cisco-logo' /> | ||
</a> | ||
} | ||
> | ||
<TopbarNav> | ||
<ListItem>Develop</ListItem> | ||
<ListItem>Styles</ListItem> | ||
<ListItem>Layout</ListItem> | ||
<ListItem>Navigation</ListItem> | ||
</TopbarNav> | ||
<TopbarRight> | ||
<div className='md-top-bar__user' /> | ||
<div className='md-top-bar__logged-out'> | ||
<a href='javascript:void(0)'>Log In</a> | ||
<Button color='blue' ariaLabel='myAriaLabel'> | ||
Button | ||
</Button> | ||
</div> | ||
</TopbarRight> | ||
<TopbarMobile shouldCloseOnClick={false}> | ||
<a | ||
href='javascript:void(0)' | ||
title='Momentum UI' | ||
> | ||
<Icon name='cisco-logo' /> | ||
</a> | ||
<ListItem>Develop</ListItem> | ||
<ListItem>Styles</ListItem> | ||
<ListItem>Layout</ListItem> | ||
<ListItem>Navigation</ListItem> | ||
</TopbarMobile> | ||
</Topbar> | ||
); | ||
} | ||
} | ||
/* eslint-enable jsx-a11y/anchor-is-valid */ |
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,46 @@ | ||
/* eslint-disable jsx-a11y/anchor-is-valid */ | ||
import React from 'react'; | ||
import { | ||
Button, | ||
Icon, | ||
Topbar, | ||
TopbarMobile, | ||
TopbarRight, | ||
} from '@momentum-ui/react'; | ||
|
||
export default class TopbarNoMiddle extends React.Component { | ||
render() { | ||
return ( | ||
<Topbar | ||
color='light' | ||
brandAnchorElement={ | ||
<a | ||
href='javascript:void(0)' | ||
title='Momentum UI' | ||
> | ||
<Icon name='cisco-logo' /> | ||
</a> | ||
} | ||
> | ||
<TopbarRight> | ||
<div className='md-top-bar__user' /> | ||
<div className='md-top-bar__logged-out'> | ||
<a href='javascript:void(0)'>Log In</a> | ||
<Button color='blue' ariaLabel='myAriaLabel'> | ||
Button | ||
</Button> | ||
</div> | ||
</TopbarRight> | ||
<TopbarMobile shouldCloseOnClick={false}> | ||
<a | ||
href='javascript:void(0)' | ||
title='Momentum UI' | ||
> | ||
<Icon name='cisco-logo' /> | ||
</a> | ||
</TopbarMobile> | ||
</Topbar> | ||
); | ||
} | ||
} | ||
/* eslint-enable jsx-a11y/anchor-is-valid */ |
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,6 @@ | ||
export { default as TopbarLight } from './Light'; | ||
export { default as TopbarDark } from './Dark'; | ||
export { default as TopbarBlue } from './Blue'; | ||
export { default as TopbarNoMiddle } from './NoMiddle'; | ||
export { default as TopbarKitchenSink } from './KitchenSink'; | ||
|
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
Oops, something went wrong.