@equinor/eds-core-react
Version:
The React implementation of the Equinor Design System
37 lines (34 loc) • 1.07 kB
JavaScript
import { forwardRef } from 'react';
import styled, { css } from 'styled-components';
import { jsxs, jsx } from 'react/jsx-runtime';
import { Divider } from '../Divider/Divider.js';
const StyledPopoverHeader = styled.div.withConfig({
displayName: "PopoverHeader__StyledPopoverHeader",
componentId: "sc-ibcx7p-0"
})(({
theme
}) => {
return css(["display:flex;justify-content:space-between;align-items:center;padding:", " ", " 0 ", ";"], theme.entities.title.spacings.top, theme.spacings.right, theme.spacings.left);
});
const StyledDivider = styled(Divider).withConfig({
displayName: "PopoverHeader__StyledDivider",
componentId: "sc-ibcx7p-1"
})(["margin-bottom:0;"]);
const PopoverHeader = /*#__PURE__*/forwardRef(function PopoverHeader({
children,
...rest
}, ref) {
const props = {
...rest,
ref
};
return /*#__PURE__*/jsxs("div", {
...props,
children: [/*#__PURE__*/jsx(StyledPopoverHeader, {
children: children
}), /*#__PURE__*/jsx(StyledDivider, {
variant: "small"
})]
});
});
export { PopoverHeader };