UNPKG

react-custom-tours

Version:

A library with tips that you can attach to blocks on your sites so that users can more easily understand how to use your site

15 lines (14 loc) 339 B
import { useEffect as f } from "react"; function i(r) { return "--rct-" + r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(); } const n = (r, e, t) => { f(() => { e && Object.entries(e[t || "light"]).forEach(([a, c]) => { r?.current?.style.setProperty(i(a), c); }); }, [e, r, t]); }; export { n as usePropsColors };