@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
61 lines (58 loc) • 2.73 kB
JavaScript
import React from 'react';
import { rem, useMantineTheme, getSize } from '@mantine/styles';
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
const iconSizes = {
xs: rem(14),
sm: rem(18),
md: rem(20),
lg: rem(24),
xl: rem(28)
};
function ChevronIcon(_a) {
var _b = _a, { size, error, style } = _b, others = __objRest(_b, ["size", "error", "style"]);
const theme = useMantineTheme();
const _size = getSize({ size, sizes: iconSizes });
return /* @__PURE__ */ React.createElement("svg", __spreadValues({
width: _size,
height: _size,
viewBox: "0 0 15 15",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
style: __spreadValues({ color: error ? theme.colors.red[6] : theme.colors.gray[6] }, style),
"data-chevron": true
}, others), /* @__PURE__ */ React.createElement("path", {
d: "M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",
fill: "currentColor",
fillRule: "evenodd",
clipRule: "evenodd"
}));
}
export { ChevronIcon };
//# sourceMappingURL=ChevronIcon.js.map