UNPKG

tav-ui

Version:
1 lines 846 B
{"version":3,"file":"useModalContext2.mjs","sources":["../../../../../../../../packages/components/modal/src/hooks/useModalContext.ts"],"sourcesContent":["import { createContext, useContext } from '@tav-ui/hooks/core/useContext'\nimport type { InjectionKey } from 'vue'\n\nexport interface ModalContextProps {\n redoModalHeight: () => void\n}\n\nconst key: InjectionKey<ModalContextProps> = Symbol()\n\nexport function createModalContext(context: ModalContextProps) {\n return createContext<ModalContextProps>(context, key)\n}\n\nexport function useModalContext() {\n return useContext<ModalContextProps>(key)\n}\n"],"names":[],"mappings":";;AACA,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;AACd,SAAS,kBAAkB,CAAC,OAAO,EAAE;AAC5C,EAAE,OAAO,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AACrC,CAAC;AACM,SAAS,eAAe,GAAG;AAClC,EAAE,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;AACzB;;;;"}