// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. import { BaseProps } from '../types'; import { ApiMethod, ComponentRenderer, DefaultProps, RenderFn, Options } from './types'; import withObservableDiv from './observableDiv'; export default function withApiDiv> (call: ApiMethod, options?: Options): ComponentRenderer { return (render: RenderFn, defaultProps: DefaultProps = {}): React.ComponentType => withObservableDiv('rawCall', { ...options, params: [call] })(render, defaultProps); }