1.0.0 • Published 3 years ago
react-detect-theme v1.0.0
react-detect-theme
hook to detect user system theme
Install
npm install --save react-detect-theme
Usage
import * as React from "react";
import { useIsDark } from "react-detect-theme";
const Example = () => {
const theme = useIsDark();
return <div>{theme ? "dark" : "light"}</div>;
};
License
MIT © siddharthkul
1.0.0
3 years ago