UNPKG

@equinor/eds-core-react

Version:

The React implementation of the Equinor Design System

30 lines (27 loc) 956 B
import { forwardRef } from 'react'; import styled, { css } from 'styled-components'; import { typographyTemplate } from '@equinor/eds-utils'; import { jsx, Fragment } from 'react/jsx-runtime'; const StyledDialogTitle = styled.div.withConfig({ displayName: "DialogTitle__StyledDialogTitle", componentId: "sc-1t3jljt-0" })(({ theme, children }) => { return css(["", " min-height:", ";align-self:end;justify-self:start;margin-right:", ";", ""], typographyTemplate(theme.entities.title.typography), theme.entities.title.minHeight, theme.entities.children.spacings.right, !children && css(["min-height:initial;height:'8px';"])); }); const DialogTitle = /*#__PURE__*/forwardRef(function DialogTitle({ children, ...rest }, ref) { return /*#__PURE__*/jsx(Fragment, { children: /*#__PURE__*/jsx(StyledDialogTitle, { id: "eds-dialog-title", ref: ref, ...rest, children: children }) }); }); export { DialogTitle };