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 './Foot.tokens.js'; import { bordersTemplate } from '@equinor/eds-utils'; import { InnerContext } from '../Inner.context.js'; import { jsx } from 'react/jsx-runtime'; const StyledTableFoot = styled.tfoot.withConfig({ displayName: "Foot__StyledTableFoot", componentId: "sc-3w9vih-0" })(["", " background:", ";"], bordersTemplate(token.border), token.background); const Foot = /*#__PURE__*/forwardRef(function Foot({ children, sticky, ...props }, ref) { return /*#__PURE__*/jsx(InnerContext.Provider, { value: { variant: 'foot', sticky }, children: /*#__PURE__*/jsx(StyledTableFoot, { ...props, ref: ref, children: children }) }); }); export { Foot };