npm.io
1.0.1 • Published 6 years ago

react-native-shadow-style

Licence
MIT
Version
1.0.1
Deps
0
Size
2 kB
Vulns
0
Weekly
0
Stars
2

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
`

Keywords