monkeeShark/packages/frontend/src/scripts/is-device-darkmode.ts
2022-12-27 14:36:33 +09:00

3 lines
106 B
TypeScript

export function isDeviceDarkmode() {
return window.matchMedia('(prefers-color-scheme: dark)').matches;
}