UNPKG

@equinor/eds-core-react

Version:

The React implementation of the Equinor Design System

34 lines (31 loc) 858 B
import { forwardRef } from 'react'; import styled, { css } from 'styled-components'; import { jsx } from 'react/jsx-runtime'; const StyledBannerActions = styled.div.withConfig({ displayName: "BannerActions__StyledBannerActions", componentId: "sc-1o38ds2-0" })(({ theme, $placement }) => { return css(["display:flex;margin-left:", ";grid-gap:8px;grid-column:", ";", ""], theme.spacings.left, $placement === 'bottom' ? '1/-1' : 'auto', $placement === 'bottom' && { marginTop: theme.spacings.top, marginLeft: '0' }); }); const BannerActions = /*#__PURE__*/forwardRef(function BannerActions({ children, placement = 'left', ...rest }, ref) { const props = { ref, ...rest }; return /*#__PURE__*/jsx(StyledBannerActions, { $placement: placement, ...props, children: children }); }); export { BannerActions };