UNPKG

@equinor/eds-core-react

Version:

The React implementation of the Equinor Design System

38 lines (35 loc) 1.12 kB
import { forwardRef } from 'react'; import styled, { css } from 'styled-components'; import { jsxs, jsx } from 'react/jsx-runtime'; import { Divider } from '../Divider/Divider.js'; const StyledDialogHeader = styled.div.withConfig({ displayName: "DialogHeader__StyledDialogHeader", componentId: "sc-mbwcos-0" })(({ theme }) => { return css(["display:flex;justify-content:space-between;align-items:center;padding:", " ", " 0 ", ";"], theme.entities.children.spacings.top, theme.entities.children.spacings.right, theme.entities.children.spacings.left); }); const StyledDivider = styled(Divider).withConfig({ displayName: "DialogHeader__StyledDivider", componentId: "sc-mbwcos-1" })(["margin-bottom:0;"]); const DialogHeader = /*#__PURE__*/forwardRef(function DialogHeader({ children, ...rest }, ref) { const props = { ...rest, ref }; return /*#__PURE__*/jsxs("div", { ...props, children: [/*#__PURE__*/jsx(StyledDialogHeader, { children: children }), /*#__PURE__*/jsx(StyledDivider, { variant: "small", color: "medium" })] }); }); export { DialogHeader };