UNPKG

@blockstack/ui

Version:

Blockstack UI components built using React and styled-components with styled-system.

51 lines (41 loc) 1.38 kB
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js'; import { createElement } from 'react'; import { Svg } from '../svg/index.esm.js'; var rotate = function rotate(direction) { if (direction === void 0) { direction = 'right'; } switch (direction) { case 'left': return '90'; case 'up': return '180'; case 'right': return '270'; case 'down': return 0; default: throw new Error('`rotate` must receive direction parameter'); } }; var ChevronIcon = function ChevronIcon(_ref) { var direction = _ref.direction, _ref$size = _ref.size, size = _ref$size === void 0 ? '16px' : _ref$size, _ref$style = _ref.style, style = _ref$style === void 0 ? {} : _ref$style, props = _objectWithoutPropertiesLoose(_ref, ["direction", "size", "style"]); return createElement(Svg, Object.assign({ width: size, height: size, viewBox: "0 0 16 16", style: _objectSpread2({}, style, { transform: "rotate(" + rotate(direction) + "deg)" }) }, props), createElement("path", { fill: props.color || 'currentColor', d: "M4.7 7.367l3.3 3.3 3.3-3.3-.943-.943L8 8.78 5.643 6.424l-.943.943z" })); }; export { ChevronIcon }; //# sourceMappingURL=chevron-icon.esm.js.map