@remotion/shapes
Version:
Generate SVG shapes
28 lines (27 loc) • 1.29 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Arrow = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const make_arrow_1 = require("../utils/make-arrow");
const render_svg_1 = require("./render-svg");
/**
* @description Renders an SVG element containing an arrow shape.
* @param {Number} length The total length of the arrow along its direction axis. Default 300.
* @param {Number} headWidth The width of the arrowhead at its widest point. Default 185.
* @param {Number} headLength The length of the arrowhead portion. Default 120.
* @param {Number} shaftWidth The width of the arrow shaft. Default 80.
* @param {string} direction The direction the arrow points. Default 'right'.
* @param {Number} cornerRadius Rounds the corner using an arc. Similar to CSS's border-radius.
* @see [Documentation](https://www.remotion.dev/docs/shapes/arrow)
*/
const Arrow = ({ length, headWidth, headLength, shaftWidth, direction, cornerRadius, ...props }) => {
return (jsx_runtime_1.jsx(render_svg_1.RenderSvg, { ...(0, make_arrow_1.makeArrow)({
length,
headWidth,
headLength,
shaftWidth,
direction,
cornerRadius,
}), ...props }));
};
exports.Arrow = Arrow;