@atlaskit/side-navigation
Version:
A highly composable side navigation component that supports nested views.
44 lines • 897 B
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
/**
* __Container__
*
* A container for Header and Footer that safely handles props to the child component
*/
const HeaderContainer = ({
children,
'data-testid': testId,
...props
}) => {
// https://stackoverflow.com/a/39333479
const safeProps = (({
className,
onClick,
onMouseDown,
onDragStart,
draggable,
ref,
tabIndex,
disabled
}) => ({
className,
onClick,
onMouseDown,
onDragStart,
draggable,
ref,
tabIndex,
disabled
}))(props);
return (
/*#__PURE__*/
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
React.createElement("div", _extends({
"data-testid": testId,
style: {
position: 'relative'
}
}, safeProps), children)
);
};
export default HeaderContainer;