Skip to content

Commit

Permalink
Update icon size to match new channel header (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilander authored and crspeller committed Mar 28, 2018
1 parent e7ba9e2 commit 91aade7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 40 deletions.
44 changes: 5 additions & 39 deletions webapp/components/channel_header_button/channel_header_button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default class ChannelHeaderButton extends React.PureComponent {

this.state = {
showPopover: false,
hover: false,
rowStartHover: false,
rowStartWithTopicHover: false,
rowShareHover: false,
Expand All @@ -43,14 +42,6 @@ export default class ChannelHeaderButton extends React.PureComponent {
};
}

showHover = () => {
this.setState({hover: true});
}

hideHover = () => {
this.setState({hover: false});
}

rowStartShowHover = () => {
this.setState({rowStartHover: true});
}
Expand Down Expand Up @@ -110,17 +101,11 @@ export default class ChannelHeaderButton extends React.PureComponent {

const style = getStyle(this.props.theme);

const isHovering = this.state.hover || this.state.showPopover;
const containerStyle = isHovering ? {...style.iconContainer, ...style.iconContainerHover} : style.iconContainer;
const iconStyle = isHovering ? style.iconButtonHover : style.iconButton;

return (
<div>
<div
id='zoomChannelHeaderPopover'
style={containerStyle}
onMouseEnter={this.showHover}
onMouseLeave={this.hideHover}
className={this.state.showPopover ? 'channel-header__icon active' : 'channel-header__icon'}
>
<OverlayTrigger
trigger={['hover', 'focus']}
Expand All @@ -139,7 +124,7 @@ export default class ChannelHeaderButton extends React.PureComponent {
}}
>
<span
style={iconStyle}
style={style.iconStyle}
aria-hidden='true'
dangerouslySetInnerHTML={{__html: Svgs.VIDEO_CAMERA}}
/>
Expand Down Expand Up @@ -232,28 +217,9 @@ export default class ChannelHeaderButton extends React.PureComponent {

const getStyle = makeStyleFromTheme((theme) => {
return {
iconContainer: {
border: '1px solid',
borderRadius: '50%',
borderColor: changeOpacity(theme.centerChannelColor, 0.12),
cursor: 'pointer',
height: '37px',
lineHeight: '36px',
margin: '17px 10px 0 0',
minWidth: '30px',
textAlign: 'center',
width: '37px',
fill: changeOpacity(theme.centerChannelColor, 0.4)
},
iconContainerHover: {
fill: theme.linkColor,
borderColor: theme.linkColor
},
iconButton: {
color: '#B1B1B3'
},
iconButtonHover: {
color: theme.linkColor
iconStyle: {
position: 'relative',
top: '-1px'
},
popover: {
marginLeft: '-100px',
Expand Down
2 changes: 1 addition & 1 deletion webapp/constants/svgs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 91aade7

Please sign in to comment.