@coveord/plasma-mantine
Version:
A Plasma flavoured Mantine theme
39 lines (38 loc) • 1.48 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "RemoveButton", {
enumerable: true,
get: function() {
return RemoveButton;
}
});
var _object_spread = require("@swc/helpers/_/_object_spread");
var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
var _jsxruntime = require("react/jsx-runtime");
var _plasmareacticons = require("@coveord/plasma-react-icons");
var _core = require("@mantine/core");
var _ActionIcon = require("../../../ActionIcon/ActionIcon.js");
var _CollectionContext = require("../../CollectionContext.js");
var RemoveButton = function RemoveButton(param) {
var removable = param.removable, onRemove = param.onRemove;
var getStyles = (0, _CollectionContext.useCollectionContext)().getStyles;
if (!removable || !onRemove) {
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
style: {
width: 28
}
});
}
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Box, _object_spread_props._(_object_spread._({}, getStyles('removeButton')), {
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ActionIcon.ActionIcon.Quaternary, {
onClick: onRemove,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_plasmareacticons.IconTrash, {
"aria-label": "Remove",
size: 16
})
})
}));
};
//# sourceMappingURL=RemoveButton.js.map