@mskcc/carbon-react
Version:
Carbon react components for the MSKCC DSM
43 lines (39 loc) • 1.08 kB
JavaScript
/**
* MSKCC 2021, 2024
*/
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React__default from 'react';
import { usePrefix } from '../../internal/usePrefix.js';
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
const TableToolbar = _ref => {
let {
children,
size,
...rest
} = _ref;
const prefix = usePrefix();
const className = cx({
[`${prefix}--table-toolbar`]: true,
[`${prefix}--table-toolbar--${size}`]: size
});
return /*#__PURE__*/React__default.createElement("section", _extends({}, rest, {
className: className
}), children);
};
TableToolbar.propTypes = {
/**
* Required props for the accessibility label of the TableToolbar
*/
...AriaLabelPropType,
/**
* Pass in the children that will be rendered inside the TableToolbar
*/
children: PropTypes.node,
/**
* `lg` Change the row height of table
*/
size: PropTypes.oneOf(['sm', 'lg'])
};
export { TableToolbar as default };