import React from 'react'
import {EditorContextProps} from '../global/interface'

// editor 类型说明

export const EditorContext = React.createContext<EditorContextProps | null>(null)

const {Provider} = EditorContext

export const EditorProvider: React.FC<EditorContextProps> = props => {
  const {children, ...restProps} = props
  return <Provider value={restProps}>{children}</Provider>
}
