UNPKG

@payfit/unity-components

Version:

28 lines (27 loc) 631 B
import { createContext as e, useContext as t } from "react"; import { jsx as n } from "react/jsx-runtime"; //#region src/components/avatar/Avatar.context.tsx var r = e({ variant: "circle", size: "md", hasPair: !1, color: void 0 }); function i({ variant: e, size: t, hasPair: i, color: a, children: o }) { return /* @__PURE__ */ n(r.Provider, { value: { variant: e, size: t, hasPair: i, color: a }, children: o }); } function a() { let e = t(r); if (!e) throw Error("useAvatarContext must be used within an AvatarProvider"); return e; } //#endregion export { i as AvatarProvider, a as useAvatarContext };