UNPKG

745 BJavaScriptView Raw
1import { requireNativeViewManager } from '@unimodules/core';
2import nullthrows from 'nullthrows';
3import React from 'react';
4import { AdMediaViewContext } from './withNativeAd';
5export default class AdMediaView extends React.Component {
6 render() {
7 return (React.createElement(AdMediaViewContext.Consumer, null, (contextValue) => {
8 const context = nullthrows(contextValue);
9 return React.createElement(NativeAdMediaView, Object.assign({}, this.props, { ref: context.nativeRef }));
10 }));
11 }
12}
13// eslint-disable-next-line @typescript-eslint/no-redeclare -- the type and variable share a name
14export const NativeAdMediaView = requireNativeViewManager('MediaView');
15//# sourceMappingURL=AdMediaView.js.map
\No newline at end of file