diff --git a/lib/BorderShadow.js b/lib/BorderShadow.js index fe9baf8..ffa40d9 100644 --- a/lib/BorderShadow.js +++ b/lib/BorderShadow.js @@ -1,45 +1,45 @@ import React, {Component} from 'react' import {View} from 'react-native' -import Svg,{ Rect,Defs,LinearGradient,Stop,RadialGradient,Path } from 'react-native-svg' +import Svg, {Rect, Defs, LinearGradient, Stop, RadialGradient, Path} from 'react-native-svg' export default class BorderShadow extends Component { render = () => { - const { setting:{side="bottom",width=0,color="#000",border=0,opacity=1,inset=false,style={}}, children } = this.props + const {setting: {side = "bottom", width = 0, color = "#000", border = 0, opacity = 1, inset = false, style = {}}, children} = this.props const linear = (key) => { return [ - , - + , + ] } const lineWidth = border return ( - - {(()=>{ - switch (side){ + + {(() => { + switch (side) { case "top": return [ - + {linear('BorderTop')} {linear('BorderTopInset')} - + , ...children ] case "bottom": return [ ...children, - + {linear('BorderBottom')} {linear('BorderBottomInset')} - + ] default: