@open-formulieren/formio-builder
Version:
An opinionated Formio webform builder for Open Forms
43 lines (42 loc) • 1.46 kB
JavaScript
import { jsxs as n, jsx as e } from "react/jsx-runtime";
import { useContext as d } from "react";
import { useIntl as p, defineMessage as r, FormattedMessage as i } from "react-intl";
import { DesignerContext as f } from "../../../context.js";
/* empty css */
const h = ({
component: o
}) => {
const s = p(), {
editComponent: m,
deleteComponent: c
} = d(f), a = r({
id: "yaI9aD",
defaultMessage: [{
type: 0,
value: "Edit component"
}]
}), l = r({
id: "0gGl1O",
defaultMessage: [{
type: 0,
value: "Delete component"
}]
});
return /* @__PURE__ */ n("div", { className: "offb-component-controls btn-group", children: [
/* @__PURE__ */ n("button", { className: "btn btn-xxs btn-secondary", title: s.formatMessage(a), onClick: (t) => {
t.preventDefault(), m(o);
}, children: [
/* @__PURE__ */ e("span", { className: "sr-only", children: /* @__PURE__ */ e(i, { ...a }) }),
/* @__PURE__ */ e("i", { className: "fa fa-cog", "aria-hidden": "true" })
] }),
/* @__PURE__ */ n("button", { className: "btn btn-xxs btn-danger", title: s.formatMessage(l), onClick: (t) => {
t.preventDefault(), c(o);
}, children: [
/* @__PURE__ */ e("span", { className: "sr-only", children: /* @__PURE__ */ e(i, { ...l }) }),
/* @__PURE__ */ e("i", { className: "fa fa-trash", "aria-hidden": "true" })
] })
] });
};
export {
h as default
};