New: Auto theme option to match OS theme

Co-authored-by: Qstick <qstick@gmail.com>
This commit is contained in:
Zak Saunders
2022-12-06 07:22:52 +00:00
committed by Qstick
parent cd3e99ad87
commit c69843931e
3 changed files with 6 additions and 2 deletions

View File

@@ -1,7 +1,11 @@
import * as dark from './dark';
import * as light from './light';
const defaultDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
const auto = defaultDark ? { ...dark } : { ...light };
export default {
auto,
light,
dark
};