import { useContext } from "react"; import { StyleContext } from "./StyleProvider"; export const useStyle = () => { const context = useContext(StyleContext); if (context === undefined) { throw new Error("useStyleContext must be used within a StyleProvider"); } return context; };