Archived
2
0
Fork 0

Add overlay style to buttons, continue video after expanding it

This commit is contained in:
Eugen Rochko 2017-04-13 17:01:09 +02:00
parent e70b84b1dc
commit 5f8155482a
8 changed files with 88 additions and 31 deletions

View file

@ -39,8 +39,8 @@ const spoilerSubSpanStyle = {
const spoilerButtonStyle = {
position: 'absolute',
top: '6px',
left: '8px',
top: '4px',
left: '4px',
zIndex: '100'
};
@ -232,8 +232,8 @@ const MediaGallery = React.createClass({
return (
<div style={{ ...outerStyle, height: `${this.props.height}px` }}>
<div style={spoilerButtonStyle}>
<IconButton title={intl.formatMessage(messages.toggle_visible)} icon={this.state.visible ? 'eye' : 'eye-slash'} onClick={this.handleOpen} />
<div style={{ ...spoilerButtonStyle, display: !this.state.visible ? 'none' : 'block' }}>
<IconButton title={intl.formatMessage(messages.toggle_visible)} icon={this.state.visible ? 'eye' : 'eye-slash'} overlay onClick={this.handleOpen} />
</div>
{children}