Changeset View
Changeset View
Standalone View
Standalone View
native/markdown/markdown-context.js
// @flow | // @flow | ||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import type { SetState } from 'lib/types/hook-types'; | import type { SetState } from 'lib/types/hook-types'; | ||||
export type MarkdownContextType = { | export type MarkdownContextType = { | ||||
+setLinkModalActive: SetState<{ [key: string]: boolean }>, | +setLinkModalActive: SetState<{ [key: string]: boolean }>, | ||||
+linkModalActive: { [key: string]: boolean }, | +linkModalActive: { [key: string]: boolean }, | ||||
+setSpoilerRevealed: SetState<{ [key: string]: { [key: number]: boolean } }>, | |||||
+spoilerRevealed: { [key: string]: { [key: number]: boolean } }, | |||||
+clearMarkdownContextData: () => void, | +clearMarkdownContextData: () => void, | ||||
}; | }; | ||||
const MarkdownContext: React.Context<?MarkdownContextType> = React.createContext<?MarkdownContextType>( | const MarkdownContext: React.Context<?MarkdownContextType> = React.createContext<?MarkdownContextType>( | ||||
null, | null, | ||||
); | ); | ||||
export { MarkdownContext }; | export { MarkdownContext }; |