diff --git a/src/App.jsx b/src/App.jsx index dc0e728b..1ca8704a 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -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', ''); + if (localStorage.getItem('darkTheme') === 'true') document.getElementsByClassName('Toastify')[0].classList.add('dark'); } closeWelcome() { diff --git a/src/components/widgets/quote/Quote.jsx b/src/components/widgets/quote/Quote.jsx index 50f6b304..37711ac6 100644 --- a/src/components/widgets/quote/Quote.jsx +++ b/src/components/widgets/quote/Quote.jsx @@ -112,8 +112,7 @@ export default class Quote extends React.PureComponent {

{`${this.state.quote}`}

- {this.state.author} - {copy} {tweet} {this.state.favourited} + {this.state.author} {copy} {tweet} {this.state.favourited}

); diff --git a/src/scss/modules/_toast.scss b/src/scss/modules/_toast.scss index 629df8e3..6bb1ee7e 100644 --- a/src/scss/modules/_toast.scss +++ b/src/scss/modules/_toast.scss @@ -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; + } +} \ No newline at end of file