| 13 |
const HeaderCellInfoWrapper = ({ children, info, className, variant = 'tooltip', popoverProps, tooltipProps, ariaLabel }) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, react_styles_1.css)(table_1.default.tableColumnHelp, className), children: [typeof children === 'string' ? (0, jsx_runtime_1.jsx)(TableText_1.TableText, { children: children }) : children, (0, jsx_runtime_1.jsx)("span", { className: (0, react_styles_1.css)(table_1.default.tableColumnHelpAction), children: variant === 'tooltip' ? ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, Object.assign({ content: info }, tooltipProps, { children: (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "plain", hasNoPadding: true, "aria-label": ariaLabel || (typeof info === 'string' && info) || 'More info', icon: (0, jsx_runtime_1.jsx)(help_icon_1.default, {}) }) }))) : ((0, jsx_runtime_1.jsx)(Popover_1.Popover, Object.assign({ bodyContent: info }, popoverProps, { children: (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "plain", hasNoPadding: true, "aria-label": ariaLabel || (typeof info === 'string' && info) || 'More info', icon: (0, jsx_runtime_1.jsx)(help_icon_1.default, {}) }) }))) })] })); |