mirror of
https://github.com/mue/mue.git
synced 2026-07-09 05:34:20 +02:00
Fix and make toast dark theme
This commit is contained in:
@@ -40,6 +40,7 @@ export default class App extends React.PureComponent {
|
||||
if (localStorage.getItem('showWelcome') === 'true') this.setState({ welcomeModal: true });
|
||||
const css = localStorage.getItem('customcss');
|
||||
if (css) document.head.insertAdjacentHTML('beforeend', '<style>' + css + '</style>');
|
||||
if (localStorage.getItem('darkTheme') === 'true') document.getElementsByClassName('Toastify')[0].classList.add('dark');
|
||||
}
|
||||
|
||||
closeWelcome() {
|
||||
|
||||
@@ -112,8 +112,7 @@ export default class Quote extends React.PureComponent {
|
||||
<div className='quotediv'>
|
||||
<h1 className='quote'>{`${this.state.quote}`}</h1>
|
||||
<h1 className='quoteauthor'>
|
||||
<a href={this.state.authorlink} className='quoteauthorlink' target='_blank' rel='noopener noreferrer'>{this.state.author}</a>
|
||||
{copy} {tweet} {this.state.favourited}
|
||||
<a href={this.state.authorlink} className='quoteauthorlink' target='_blank' rel='noopener noreferrer'>{this.state.author}</a> {copy} {tweet} {this.state.favourited}
|
||||
</h1>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -26,3 +26,15 @@
|
||||
.Toastify__toast-container {
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
.dark {
|
||||
.Toastify__toast {
|
||||
background-color: #2f3542 !important;
|
||||
}
|
||||
|
||||
.Toastify__toast-body,
|
||||
.Toastify__progress-bar--default,
|
||||
.Toastify__close-button {
|
||||
color: white !important;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user