react-native-shadow-style

1.0.1 • Public • Published

react-native-shadow-style

Use this function to create shadows for Android and iOS

yarn add react-native-shadow-style

How to use

import React from 'react'
import { View } from 'react-native'
import shadowStyle from 'react-native-shadow-style'
 
const App = () => (
  <View
    style={{
      // Others styles
      ...shadowStyle(5)
    }}
  />
)

Use with styled components

import styled from 'styled-components/native'
import shadowStyle from 'react-native-shadow-style'
 
export const Container = styled.View.attrs({
  ...shadowGenerator(5),
})`
  // Others styles
`

Package Sidebar

Install

npm i react-native-shadow-style

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

1.9 kB

Total Files

3

Last publish

Collaborators

  • maicolsantos