react-native-curved-bottom-bar
Version:
A high performance, beautiful and fully customizable curved bottom navigation bar for React Native.
30 lines • 1.11 kB
JavaScript
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React from 'react';
import { Path, Svg } from 'react-native-svg';
import { CurvedBottomBarView } from '../ShadowView';
const CurvedContainer = props => {
const {
style,
width,
height,
bgColor,
path,
borderColor,
borderWidth
} = props;
const border = borderWidth && borderWidth > 0 ? {
stroke: borderColor,
strokeWidth: borderWidth
} : {};
return /*#__PURE__*/React.createElement(CurvedBottomBarView, {
style: style
}, /*#__PURE__*/React.createElement(Svg, {
width: width,
height: height
}, /*#__PURE__*/React.createElement(Path, _extends({
fill: bgColor,
d: path
}, border))));
};
export const CurvedViewComponent = /*#__PURE__*/React.memo(CurvedContainer);
//# sourceMappingURL=curvedView.js.map