@wordpress/components
Version:
UI components for WordPress.
46 lines (42 loc) • 1.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.TreeGridRow = void 0;
var _element = require("@wordpress/element");
var _jsxRuntime = require("react/jsx-runtime");
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
function UnforwardedTreeGridRow({
children,
level,
positionInSet,
setSize,
isExpanded,
...props
}, ref) {
return /*#__PURE__*/(0, _jsxRuntime.jsx)("tr", {
...props,
ref: ref,
role: "row",
"aria-level": level,
"aria-posinset": positionInSet,
"aria-setsize": setSize,
"aria-expanded": isExpanded,
children: children
});
}
/**
* `TreeGridRow` is used to create a tree hierarchy.
* It is not a visually styled component, but instead helps with adding
* keyboard navigation and roving tab index behaviors to tree grid structures.
*
* @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}
*/
const TreeGridRow = exports.TreeGridRow = (0, _element.forwardRef)(UnforwardedTreeGridRow);
var _default = exports.default = TreeGridRow;
//# sourceMappingURL=row.js.map