UNPKG

@equinor/eds-core-react

Version:

The React implementation of the Equinor Design System

44 lines (41 loc) 1.1 kB
import { forwardRef } from 'react'; import styled, { css } from 'styled-components'; import { bordersTemplate, spacingsTemplate, typographyTemplate } from '@equinor/eds-utils'; import { jsx } from 'react/jsx-runtime'; const StyledAccordionPanel = styled.div.attrs(({ $headerId }) => ({ role: 'region', 'aria-labelledby': $headerId })).withConfig({ displayName: "AccordionPanel__StyledAccordionPanel", componentId: "sc-suplv4-0" })(({ theme }) => { const { entities: { header, panel }, border } = theme; return css(["", " border-top:0;", " ", " background:", ";min-height:96px;box-sizing:border-box;"], bordersTemplate(border), spacingsTemplate(panel.spacings), typographyTemplate(panel.typography), header.background); }); const AccordionPanel = /*#__PURE__*/forwardRef(function AccordionPanel({ id, headerId, hidden, children, ...props }, ref) { return /*#__PURE__*/jsx(StyledAccordionPanel, { $headerId: headerId, id: id, hidden: hidden, ...props, ref: ref, children: children }); }); export { AccordionPanel };