Skip to content
Snippets Groups Projects
Commit 8f18c8f9 authored by Anthony Bellew's avatar Anthony Bellew Committed by GitHub
Browse files

Added inline spoiler button styles

parent d944946c
No related branches found
No related tags found
No related merge requests found
......@@ -86,6 +86,15 @@ const StatusContent = React.createClass({
const content = { __html: emojify(status.get('content')) };
const spoilerContent = { __html: emojify(status.get('spoiler_text', '')) };
const spoilerStyle = {
backgroundColor: '#fff',
borderRadius: '0 4px',
color: '#363c4b',
fontWeight: '500',
fontSize: '12px',
textTransform: 'uppercase'
};
if (status.get('spoiler_text').length > 0) {
const toggleText = hidden ? <FormattedMessage id='status.show_more' defaultMessage='Show more' /> : <FormattedMessage id='status.show_less' defaultMessage='Show less' />;
......@@ -93,7 +102,8 @@ const StatusContent = React.createClass({
return (
<div className='status__content' style={{ cursor: 'pointer' }} onMouseDown={this.handleMouseDown} onMouseUp={this.handleMouseUp}>
<p style={{ marginBottom: hidden ? '0px' : '' }} >
<span dangerouslySetInnerHTML={spoilerContent} /> <a onClick={this.handleSpoilerClick}>[{toggleText}]</a>
<span dangerouslySetInnerHTML={spoilerContent} />
<a style={spoilerStyle} onClick={this.handleSpoilerClick}>[{toggleText}]</a>
</p>
<div style={{ display: hidden ? 'none' : 'block' }} dangerouslySetInnerHTML={content} />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment