1.0.0 • Published 5 years ago

react-native-simple-shadow v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

react-native-shadow-view

Getting started

$ yarn add react-native-shadow-view

Usage

Set shadow parameters to the ShadowView just as you use shadows in iOS. it will appear on android same as on iOS.

import React, { Component } from 'react';
import ShadowView from 'react-native-shadow-view'

class MyView extends Component {

	render() {
		return (
			<ShadowView
					style={{
						width: 100,
						height: 100,
						shadowColor: 'black',
						shadowOpacity: 1,
						shadowRadius: 20,
						shadowOffset: { width: 0, height: 0 },
						backgroundColor: 'rgba(0,255,0,0.5)',
					}}
				>
				... Texts / Views / etc ...
				</ShadowView>
			);
	}

export default MyView;