import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import Svg, { Defs, Ellipse, G, LinearGradient, Path, Rect, Stop } from 'react-native-svg'; /** * 阴影组件 * @param {offset} 阴影左右偏移量(配合style实现margin) * @returns React Element */ const ShadowView = ({ offset=32, style=styles.shadowView, shadowColor="#888888" }) => ( ); export default ShadowView; export const ShadowViewV2 = ({ offset=42, style=styles.shadowViewV2, shadowColor="#222222" }) => ( ); const styles = StyleSheet.create({ shadowView: { opacity: 0.8, marginTop: -6, marginLeft: 16, marginRight: 16 }, shadowViewV2: { zIndex: 1, opacity: .8, marginTop: -8, marginLeft: 20, marginRight: 20, display: "none" } })