@equinor/eds-core-react
Version:
The React implementation of the Equinor Design System
28 lines (25 loc) • 854 B
JavaScript
import { forwardRef } from 'react';
import styled from 'styled-components';
import { primary } from './Card.tokens.js';
import { jsx } from 'react/jsx-runtime';
const {
spacings
} = primary;
const StyledCardHeader = styled.div.withConfig({
displayName: "CardHeader__StyledCardHeader",
componentId: "sc-15k8edh-0"
})(["display:flex;justify-content:space-between;align-items:center;padding:0 ", " 0 ", ";> :not(:first-child){margin-left:", ";}&:first-child{padding-top:", ";}&:last-child{padding-bottom:", ";}"], spacings.right, spacings.left, spacings.left, spacings.top, spacings.bottom);
const CardHeader = /*#__PURE__*/forwardRef(function CardHeader({
children,
...rest
}, ref) {
const props = {
...rest,
ref
};
return /*#__PURE__*/jsx(StyledCardHeader, {
...props,
children: children
});
});
export { CardHeader };