UNPKG

@equinor/eds-core-react

Version:

The React implementation of the Equinor Design System

33 lines (30 loc) 963 B
import { forwardRef } from 'react'; import styled, { css } from 'styled-components'; import { spacingsTemplate, typographyTemplate, outlineTemplate } from '@equinor/eds-utils'; import { jsx } from 'react/jsx-runtime'; const StyledTabPanel = styled.div.attrs(() => ({ tabIndex: 0, role: 'tabpanel' })).withConfig({ displayName: "TabPanel__StyledTabPanel", componentId: "sc-e8v1d4-0" })(({ theme }) => { const { entities: { panel } } = theme; return css(["", " ", " &:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}"], spacingsTemplate(panel.spacings), typographyTemplate(panel.typography), outlineTemplate(panel.states.focus.outline), outlineTemplate(panel.states.focus.outline)); }); const TabPanel = /*#__PURE__*/forwardRef(function TabPanel({ ...props }, ref) { return /*#__PURE__*/jsx(StyledTabPanel, { ref: ref, ...props, children: props.children }); }); export { TabPanel };