UNPKG

@equinor/eds-core-react

Version:

The React implementation of the Equinor Design System

31 lines (28 loc) 810 B
import { forwardRef } from 'react'; import styled from 'styled-components'; import { token } from './Head.tokens.js'; import { bordersTemplate } from '@equinor/eds-utils'; import { InnerContext } from '../Inner.context.js'; import { jsx } from 'react/jsx-runtime'; const StyledTableHead = styled.thead.withConfig({ displayName: "Head__StyledTableHead", componentId: "sc-g9tch7-0" })(["", " background:", ";"], bordersTemplate(token.border), token.background); const Head = /*#__PURE__*/forwardRef(function Head({ children, sticky, ...props }, ref) { return /*#__PURE__*/jsx(InnerContext.Provider, { value: { variant: 'head', sticky }, children: /*#__PURE__*/jsx(StyledTableHead, { ...props, ref: ref, children: children }) }); }); export { Head };