@wordpress/components
Version:
UI components for WordPress.
33 lines (32 loc) • 872 B
JavaScript
// packages/components/src/alignment-matrix-control/cell.tsx
import { Composite } from "../composite";
import Tooltip from "../tooltip";
import { VisuallyHidden } from "../visually-hidden";
import { ALIGNMENT_LABEL } from "./utils";
import { Cell as CellView, Point } from "./styles";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
function Cell({
id,
value,
...props
}) {
return /* @__PURE__ */ _jsx(Tooltip, {
text: ALIGNMENT_LABEL[value],
children: /* @__PURE__ */ _jsxs(Composite.Item, {
id,
render: /* @__PURE__ */ _jsx(CellView, {
...props,
role: "gridcell"
}),
children: [/* @__PURE__ */ _jsx(VisuallyHidden, {
children: value
}), /* @__PURE__ */ _jsx(Point, {
role: "presentation"
})]
})
});
}
export {
Cell as default
};
//# sourceMappingURL=cell.js.map