1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-11 05:40:11 +02:00

wrap Avatar to add styles

This commit is contained in:
Sérgio Ramos 2017-01-03 10:45:17 +00:00
parent 3f3e5fb371
commit 1f864d1b67
2 changed files with 15 additions and 23 deletions

View File

@ -1,14 +1,9 @@
const Styled = require('styled-components'); const Styled = require('styled-components');
// const fns = require('@ui/shared/functions');
const { const {
default: styled default: styled
} = Styled; } = Styled;
// const {
// remcalc
// } = fns;
// Main Contonent Wrapper Styles // Main Contonent Wrapper Styles
module.exports = styled.article` module.exports = styled.article`
`; `;

View File

@ -65,16 +65,20 @@ const StyledName = styled.span`
top: -12px; top: -12px;
`; `;
const EmptyButton = styled.button`
background: none;
border: none;
`;
const StyledAvatar = styled(Avatar)`
marginLeft: 12px;
`;
const arrowPosition = { const arrowPosition = {
bottom: '100%', bottom: '100%',
right: '10%' right: '10%'
}; };
const EmptyButton = styled.button`
background: none
border: none
`;
const Header = ({ const Header = ({
account = {}, account = {},
tooltip = false, tooltip = false,
@ -107,27 +111,20 @@ const Header = ({
<Row> <Row>
<Column xs={2}> <Column xs={2}>
<Link to='/'> <Link to='/'>
<StyledLogo <StyledLogo alt='Joyent' src={logo} />
alt='Joyent'
src={logo}
/>
</Link> </Link>
</Column> </Column>
<Column <Column smOffset={8.5} xs={1.5}>
smOffset={8.5}
xs={1.5}
>
<StyledProfileWrapper> <StyledProfileWrapper>
<StyledAvatarWrapper toggled={tooltip}> <StyledAvatarWrapper toggled={tooltip}>
<EmptyButton onClick={handleToggleClick}> <EmptyButton onClick={handleToggleClick}>
<StyledName>{account.name}</StyledName> <StyledName>
<Avatar {account.name}
</StyledName>
<StyledAvatar
alt={account.name} alt={account.name}
name={account.name} name={account.name}
src={account.avatar} src={account.avatar}
style={{
marginLeft: '12px'
}}
/> />
</EmptyButton> </EmptyButton>
</StyledAvatarWrapper> </StyledAvatarWrapper>