import { createElement, RaxNode } from 'rax';
import Children from 'rax-children';
import { default as Context, StyleProps } from './context';

export interface ThemeProviderProps extends StyleProps {
  children?: RaxNode;
}

export default ({ children, ...others }: ThemeProviderProps) => (
  <Context.Provider value={others}>{Children.only<RaxNode>(children)}</Context.Provider>
);
