@itwin/itwinui-react
Version:
A react component library for iTwinUI
47 lines (46 loc) • 1.25 kB
JavaScript
import * as React from 'react';
import cx from 'classnames';
import { IconButton } from '../Buttons/IconButton.js';
import { SvgCloseSmall, Box } from '../../utils/index.js';
export const InformationPanelHeader = React.forwardRef(
(props, forwardedRef) => {
let { children, onClose, actions, className, ...rest } = props;
return React.createElement(
Box,
{
className: cx('iui-information-header', className),
ref: forwardedRef,
...rest,
},
React.createElement(
Box,
{
as: 'span',
className: 'iui-information-header-label',
},
children,
),
React.createElement(
Box,
{
className: 'iui-information-header-actions',
},
actions,
onClose &&
React.createElement(
IconButton,
{
styleType: 'borderless',
onClick: onClose,
'aria-label': 'Close',
},
React.createElement(SvgCloseSmall, {
'aria-hidden': true,
}),
),
),
);
},
);
if ('development' === process.env.NODE_ENV)
InformationPanelHeader.displayName = 'InformationPanelHeader';