0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-13 13:02:45 +00:00

improve simple styling on theme selector. nest inside toggle.

This commit is contained in:
Gazook89
2023-12-22 22:58:13 -06:00
parent 985a9843f2
commit 7b8e398891
2 changed files with 18 additions and 13 deletions

View File

@@ -176,8 +176,9 @@ const Snippetbar = createClass({
<div className={`editorTool editorTheme ${this.state.themeSelector ? 'active' : ''}`} <div className={`editorTool editorTheme ${this.state.themeSelector ? 'active' : ''}`}
onClick={this.toggleThemeSelector} > onClick={this.toggleThemeSelector} >
<i className='fas fa-palette' /> <i className='fas fa-palette' />
</div>
{this.state.themeSelector && this.renderThemeSelector()} {this.state.themeSelector && this.renderThemeSelector()}
</div>
<div className='divider'></div> <div className='divider'></div>
<div className={cx('text', { selected: this.props.view === 'text' })} <div className={cx('text', { selected: this.props.view === 'text' })}
onClick={()=>this.props.onViewChange('text')}> onClick={()=>this.props.onViewChange('text')}>

View File

@@ -66,6 +66,7 @@
font-size : 0.75em; font-size : 0.75em;
color : black; color : black;
&.active { &.active {
position : relative;
color : white; color : white;
background-color : black; background-color : black;
} }
@@ -80,12 +81,15 @@
} }
.themeSelector { .themeSelector {
position : absolute; position : absolute;
left: -65px; top : 25px;
top: 30px; right : 0;
z-index: 999; z-index : 1;
display : flex;
align-items : center;
justify-content : center;
width : 170px; width : 170px;
background-color: black; height : inherit;
border-radius: 5px; background-color : inherit;
} }
} }
.snippetBarButton{ .snippetBarButton{