react-native-inner-shadow
Version:
react native inner shadows with linear gradient design UI
37 lines (36 loc) • 1.01 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = LinearGradientFill;
var _reactNativeSkia = require("@shopify/react-native-skia");
var _utils = require("../utils.js");
var _react = _interopRequireDefault(require("react"));
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
* Internal helper component that draws the linear gradient.
* You can rename this to "LinearGradientFill" or similar if you prefer.
*/function LinearGradientFill({
width = 0,
height = 0,
from = 'top',
to = 'bottom',
colors
}) {
const {
start,
end
} = _react.default.useMemo(() => (0, _utils.getLinearDirection)({
width,
height,
from,
to
}), [width, height, from, to]);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.LinearGradient, {
start: start,
end: end,
colors: colors
});
}
//# sourceMappingURL=ShadowLinearGradientFill.js.map
;