Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(core): Option added for [`material-ui` v1](https://material-ui-next.com) (will remain an option while [material-ui v1](https://material-ui-next.com) is still in pre-release) * update(deps): `redux-form-material-ui` version pointed to `next` if using `material-ui` v1 * update(deps): `redux-form` updated to `^7.2.0` * feat(test): tests moved to `test` folder * feat(test): mocha configuration/options moved to `mocha.opts` file within `test` folder * feat(test): test added for new `materialv1` option
- Loading branch information
1 parent
596bd85
commit cb869c1
Showing
62 changed files
with
916 additions
and
548 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 |
---|---|---|
|
@@ -5,3 +5,4 @@ npm-debug.log | |
.DS_Store | ||
**/.DS_Store | ||
examples/dist | ||
test/tmp |
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
2 changes: 1 addition & 1 deletion
2
examples/react-firebase-redux/src/components/LoadingSpinner/LoadingSpinner.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
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
65 changes: 30 additions & 35 deletions
65
examples/react-firebase-redux/src/containers/Navbar/AccountMenu.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 |
---|---|---|
@@ -1,52 +1,47 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import IconMenu from 'material-ui/IconMenu' | ||
import Menu, { MenuItem } from 'material-ui/Menu' | ||
import IconButton from 'material-ui/IconButton' | ||
import MenuItem from 'material-ui/MenuItem' | ||
import DownArrow from 'material-ui/svg-icons/hardware/keyboard-arrow-down' | ||
import Avatar from 'material-ui/Avatar' | ||
import defaultUserImage from 'static/User.png' | ||
import classes from './Navbar.scss' | ||
|
||
const buttonStyle = { marginRight: '.5rem', width: '200px', height: '64px' } | ||
import AccountCircle from 'material-ui-icons/AccountCircle' | ||
|
||
export const AccountMenu = ({ | ||
avatarUrl, | ||
displayName, | ||
goToAccount, | ||
onLogoutClick | ||
onLogoutClick, | ||
closeAccountMenu, | ||
anchorEl, | ||
handleMenu | ||
}) => ( | ||
<IconMenu | ||
iconButtonElement={ | ||
<IconButton style={buttonStyle} disableTouchRipple> | ||
<div className={classes.avatar}> | ||
<div className="hidden-mobile"> | ||
<Avatar src={avatarUrl || defaultUserImage} /> | ||
</div> | ||
<div className={classes['avatar-text']}> | ||
<span className={`${classes['avatar-text-name']} hidden-mobile`}> | ||
{displayName || 'User'} | ||
</span> | ||
<DownArrow color="white" /> | ||
</div> | ||
</div> | ||
</IconButton> | ||
} | ||
targetOrigin={{ horizontal: 'right', vertical: 'bottom' }} | ||
anchorOrigin={{ horizontal: 'right', vertical: 'top' }} | ||
animated={false}> | ||
<MenuItem primaryText="Account" onTouchTap={goToAccount} /> | ||
<MenuItem primaryText="Sign out" onTouchTap={onLogoutClick} /> | ||
</IconMenu> | ||
<div> | ||
<IconButton | ||
aria-owns={anchorEl ? 'menu-appbar' : null} | ||
aria-haspopup="true" | ||
onClick={handleMenu} | ||
color="contrast"> | ||
<AccountCircle /> | ||
</IconButton> | ||
<Menu | ||
id="menu-appbar" | ||
anchorEl={anchorEl} | ||
anchorOrigin={{ vertical: 'top', horizontal: 'right' }} | ||
transformOrigin={{ vertical: 'top', horizontal: 'right' }} | ||
open={Boolean(anchorEl)} | ||
onClose={closeAccountMenu}> | ||
<MenuItem onClick={goToAccount}>Account</MenuItem> | ||
<MenuItem onClick={onLogoutClick}>Sign Out</MenuItem> | ||
</Menu> | ||
</div> | ||
) | ||
|
||
AccountMenu.muiName = 'IconMenu' | ||
|
||
AccountMenu.propTypes = { | ||
displayName: PropTypes.string, | ||
avatarUrl: PropTypes.string, | ||
goToAccount: PropTypes.func, | ||
onLogoutClick: PropTypes.func | ||
goToAccount: PropTypes.func.isRequired, | ||
onLogoutClick: PropTypes.func.isRequired, | ||
anchorEl: PropTypes.object, | ||
closeAccountMenu: PropTypes.func.isRequired, | ||
handleMenu: PropTypes.func | ||
} | ||
|
||
export default AccountMenu |
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
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 |
---|---|---|
|
@@ -68,3 +68,7 @@ | |
display: none; | ||
} | ||
} | ||
|
||
.flex { | ||
flex: 1 !important; | ||
} |
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
Oops, something went wrong.