@atlaskit/table-tree
Version:
A table tree is an expandable table for showing nested hierarchies of information.
38 lines (35 loc) • 1.09 kB
JavaScript
/* header.tsx generated by @compiled/babel-plugin v3.0.2 */
import "./header.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
import CommonCell from './internal/common-cell';
import withColumnWidth from './internal/with-column-width';
const headerStyles = null;
/**
* This is hard-coded here because our actual <Header /> has no typings
* for its props.
*
* Adding types for real *might* break things so will need a little care.
*
* Defining it here for now lets us provide *something* without much headache.
*/
const HeaderComponent = ({
width,
children,
onClick,
id,
role = 'columnheader'
}) => {
// TODO: Determine whether proper `th` elements can be used instead of
// roles (DSP-11588)
return /*#__PURE__*/React.createElement(CommonCell, {
role: role,
width: width,
id: id,
onClick: onClick,
className: ax(["_11c8wadc _syazazsu _k48pwu06"])
}, children);
};
const Header = withColumnWidth(HeaderComponent);
// eslint-disable-next-line @repo/internal/react/require-jsdoc
export default Header;