@wordpress/components
Version:
UI components for WordPress.
35 lines (32 loc) • 965 B
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import { createElement } from "@wordpress/element";
/**
* WordPress dependencies
*/
import { forwardRef } from '@wordpress/element';
function TreeGridRow({
children,
level,
positionInSet,
setSize,
isExpanded,
...props
}, ref) {
return (// Disable reason: Due to an error in the ARIA 1.1 specification, the
// aria-posinset and aria-setsize properties are not supported on row
// elements. This is being corrected in ARIA 1.2. Consequently, the
// linting rule fails when validating this markup.
//
// eslint-disable-next-line jsx-a11y/role-supports-aria-props
createElement("tr", _extends({}, props, {
ref: ref,
role: "row",
"aria-level": level,
"aria-posinset": positionInSet,
"aria-setsize": setSize,
"aria-expanded": isExpanded
}), children)
);
}
export default forwardRef(TreeGridRow);
//# sourceMappingURL=row.js.map