UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

14 lines (11 loc) 391 B
import { useContext, createContext } from 'react'; const BlankslateContext = /*#__PURE__*/createContext(null); function useBlankslate() { const context = useContext(BlankslateContext); if (!context) { throw new Error("useBlankslate must be used within a BlankslateProvider"); } return context; } const Provider = BlankslateContext.Provider; export { Provider, useBlankslate };