UNPKG

isometric-react

Version:

Isometric styling library made in React with as much flexibility over customization as possible. Rewrite of https://morgancaron.github.io/IsometricSass/ .

16 lines (15 loc) 688 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const styled_components_1 = require("styled-components"); const shadowCSS = (distance, spacingX, spacingY) => (0, styled_components_1.css) ` &::after { border-radius: inherit; background: rgba(0, 0, 0, ${0.2 / (1 + distance / 10)}); border-color: rgba(0, 0, 0, ${0.2 / (1 + distance / 10)}); transform: translateX(${distance * spacingX}rem) translateY(${distance * spacingY}rem) translateZ(-${distance}rem); box-shadow: 0 0 ${distance / 10}rem rgba(0, 0, 0, 0.2); filter: blur(${distance / 10}rem); } `.join(""); exports.default = shadowCSS;