@itwin/itwinui-react
Version:
A react component library for iTwinUI
59 lines (58 loc) • 1.72 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', {
value: true,
});
Object.defineProperty(exports, 'InformationPanelHeader', {
enumerable: true,
get: function () {
return InformationPanelHeader;
},
});
const _interop_require_default = require('@swc/helpers/_/_interop_require_default');
const _interop_require_wildcard = require('@swc/helpers/_/_interop_require_wildcard');
const _react = /*#__PURE__*/ _interop_require_wildcard._(require('react'));
const _classnames = /*#__PURE__*/ _interop_require_default._(
require('classnames'),
);
const _IconButton = require('../Buttons/IconButton.js');
const _index = require('../../utils/index.js');
const InformationPanelHeader = _react.forwardRef((props, forwardedRef) => {
let { children, onClose, actions, className, ...rest } = props;
return _react.createElement(
_index.Box,
{
className: (0, _classnames.default)('iui-information-header', className),
ref: forwardedRef,
...rest,
},
_react.createElement(
_index.Box,
{
as: 'span',
className: 'iui-information-header-label',
},
children,
),
_react.createElement(
_index.Box,
{
className: 'iui-information-header-actions',
},
actions,
onClose &&
_react.createElement(
_IconButton.IconButton,
{
styleType: 'borderless',
onClick: onClose,
'aria-label': 'Close',
},
_react.createElement(_index.SvgCloseSmall, {
'aria-hidden': true,
}),
),
),
);
});
if ('development' === process.env.NODE_ENV)
InformationPanelHeader.displayName = 'InformationPanelHeader';