UNPKG

react-native-inner-shadow

Version:

react native inner shadows with linear gradient design UI

34 lines (32 loc) 770 B
"use strict"; import { LinearGradient } from '@shopify/react-native-skia'; import { getLinearDirection } from "../utils.js"; import React from 'react'; /** * Internal helper component that draws the linear gradient. * You can rename this to "LinearGradientFill" or similar if you prefer. */ import { jsx as _jsx } from "react/jsx-runtime"; export default function LinearGradientFill({ width = 0, height = 0, from = 'top', to = 'bottom', colors }) { const { start, end } = React.useMemo(() => getLinearDirection({ width, height, from, to }), [width, height, from, to]); return /*#__PURE__*/_jsx(LinearGradient, { start: start, end: end, colors: colors }); } //# sourceMappingURL=ShadowLinearGradientFill.js.map