@equinor/eds-core-react
Version:
The React implementation of the Equinor Design System
27 lines (24 loc) • 668 B
JavaScript
import { forwardRef } from 'react';
import styled from 'styled-components';
import { elevation, paper } from './Paper.tokens.js';
import { jsx } from 'react/jsx-runtime';
const StyledPaper = styled.div.withConfig({
displayName: "Paper__StyledPaper",
componentId: "sc-6ncnv9-0"
})(["background:", ";box-shadow:", ";"], paper.background, ({
$elevation
}) => $elevation);
const Paper = /*#__PURE__*/forwardRef(function Paper({
elevation: elevation$1 = 'none',
...rest
}, ref) {
const props = {
...rest,
$elevation: elevation[elevation$1] ?? 'none'
};
return /*#__PURE__*/jsx(StyledPaper, {
...props,
ref: ref
});
});
export { Paper };