tweak-tools
Version:
Tweak your React projects until awesomeness
31 lines (30 loc) • 1.47 kB
JavaScript
;
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Chevron = void 0;
const react_1 = __importDefault(require("react"));
const styles_1 = require("../../styles");
// TODO remove as any when this is corrected by stitches
const Svg = (0, styles_1.styled)('svg', {
fill: 'currentColor',
transition: 'transform 350ms ease, fill 250ms ease',
});
function Chevron(_a) {
var { toggled } = _a, props = __rest(_a, ["toggled"]);
return (react_1.default.createElement(Svg, Object.assign({ width: "9", height: "5", viewBox: "0 0 9 5", xmlns: "http://www.w3.org/2000/svg", style: { transform: `rotate(${toggled ? 0 : -90}deg)` } }, props),
react_1.default.createElement("path", { d: "M3.8 4.4c.4.3 1 .3 1.4 0L8 1.7A1 1 0 007.4 0H1.6a1 1 0 00-.7 1.7l3 2.7z" })));
}
exports.Chevron = Chevron;