UNPKG

@razorpay/blade

Version:

The Design System that powers Razorpay

35 lines (32 loc) 1.75 kB
import _defineProperty from '@babel/runtime/helpers/defineProperty'; import React__default from 'react'; import { FloatingArrow } from '@floating-ui/react'; import '../BladeProvider/index.js'; import { jsx } from 'react/jsx-runtime'; import useTheme from '../BladeProvider/useTheme.js'; function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } var PopupArrow = /*#__PURE__*/React__default.forwardRef(function (_ref, arrowRef) { var context = _ref.context, width = _ref.width, height = _ref.height, fillColor = _ref.fillColor, strokeColor = _ref.strokeColor, strokeWidth = _ref.strokeWidth, style = _ref.style; var _useTheme = useTheme(), theme = _useTheme.theme; return /*#__PURE__*/jsx(FloatingArrow, { ref: arrowRef, context: context, width: width, height: height, fill: fillColor, stroke: strokeColor, strokeWidth: strokeWidth !== null && strokeWidth !== void 0 ? strokeWidth : 0, tipRadius: theme.border.radius['2xsmall'], style: _objectSpread({}, style) }); }); export { PopupArrow }; //# sourceMappingURL=PopupArrow.web.js.map