UNPKG

@mapbox/react-native-mapbox-gl

Version:

A Mapbox GL react native module for creating custom maps

33 lines (25 loc) 767 B
import React from 'react'; import { requireNativeComponent } from 'react-native'; import { viewPropTypes } from '../utils'; import { LightLayerStyleProp } from '../utils/styleMap'; import AbstractLayer from './AbstractLayer'; export const NATIVE_MODULE_NAME = 'RCTMGLLight'; /** * Light represents the light source for extruded geometries */ class Light extends AbstractLayer { static propTypes = { ...viewPropTypes, /** * Customizable style attributes */ style: LightLayerStyleProp, }; render () { return <RCTMGLLight {...this.props} style={undefined} reactStyle={this.getStyle()} />; } } const RCTMGLLight = requireNativeComponent(NATIVE_MODULE_NAME, Light, { nativeOnly: { reactStyle: true }, }); export default Light;