import React from 'react';
import DocsProvider from "./docsprovider/DocsProvider"

export default class Provider extends React.Component {

   
    render() {
      
        let propsChildren = null, element = null; 
        
        try {
            propsChildren =  React.Children.only(this.props.children);
            element = React.Children.only(propsChildren.props.children);
        } catch (error) {
            element = this.props.children;
        }

        return (<DocsProvider childElement={element} />);
    }

}