UNPKG

@1771technologies/lytenyte-pro

Version:

16 lines (15 loc) 476 B
import * as React from "react"; const DirectionContext = /* @__PURE__ */ React.createContext(void 0); if (process.env.NODE_ENV !== "production") { DirectionContext.displayName = "DirectionContext"; } function useDirection(optional = true) { const context = React.useContext(DirectionContext); if (context === void 0 && !optional) { throw new Error("Base UI: DirectionContext is missing."); } return context?.direction ?? "ltr"; } export { useDirection as u };