vn-verdnaturachat/app/containers/markdown/new/MarkdownContext.ts

27 lines
561 B
TypeScript

import React from 'react';
import { IUserMention, IUserChannel } from '../interfaces';
interface IMarkdownContext {
mentions?: IUserMention[];
channels?: IUserChannel[];
useRealName?: boolean;
username?: string;
baseUrl?: string;
navToRoomInfo?: Function;
getCustomEmoji?: Function;
onLinkPress?: Function;
}
const defaultState = {
mentions: [],
channels: [],
useRealName: false,
username: '',
baseUrl: '',
navToRoomInfo: () => {}
};
const MarkdownContext = React.createContext<IMarkdownContext>(defaultState);
export default MarkdownContext;