Package Exports
- theme-detector
- theme-detector/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (theme-detector) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Theme detector
Get the theme of the browser also works in ionic apps
Install
Via npm
npm install theme-detector
Via yarn
yarn add theme-detector
Usage
Once the package is installed you use the import approach
import checkTheme from 'theme-detector';
console.log(checkTheme());
// If browser theme is dark it logs 'dark'
// If browser theme is light it logs 'light'
Support
If you like this project, You can support me with starring ⭐ this repository.