@chayns-components/core
Version:
A set of beautiful React components for developing your own applications with chayns.
82 lines (80 loc) • 2.88 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.StyledGridTopRightImage = exports.StyledGridLeftImage = exports.StyledGridImage = exports.StyledGridBottomRightImage = void 0;
var _styledComponents = _interopRequireWildcard(require("styled-components"));
var _keyboardFocusHighlighting = require("../../utils/keyboardFocusHighlighting.styles");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
const StyledGridImage = exports.StyledGridImage = _styledComponents.default.div`
background: ${({
$background,
theme
}) => $background || `rgba(${theme['text-rgb'] ?? '0,0,0'}, 0.1)`};
border-radius: ${({
$shouldShowRoundImage
}) => $shouldShowRoundImage ? '50%' : undefined};
box-shadow: 0 0 0 1px rgba(${({
theme
}) => theme['009-rgb']}, 0.08) inset;
height: ${({
$size
}) => $size}px;
overflow: hidden;
position: relative;
transition: border-radius 0.3s ease;
width: ${({
$size
}) => $size}px;
flex: 0 0 auto;
${({
$shouldShowKeyboardHighlighting
}) => $shouldShowKeyboardHighlighting && (0, _styledComponents.css)`
&:focus-visible {
${_keyboardFocusHighlighting.keyboardFocusHighlightingRingCss}
}
`}
`;
const StyledGridLeftImage = exports.StyledGridLeftImage = _styledComponents.default.img`
border-right: ${({
$size
}) => $size / 40}px solid white;
height: 100%;
left: 0;
object-fit: cover;
opacity: ${({
$isHidden
}) => $isHidden ? 0 : 1};
position: absolute;
top: 0;
transition: opacity 0.4s ease;
width: 60%;
`;
const StyledGridTopRightImage = exports.StyledGridTopRightImage = _styledComponents.default.img`
border-bottom: ${({
$size
}) => $size / 40}px solid white;
height: 50%;
object-fit: cover;
opacity: ${({
$isHidden
}) => $isHidden ? 0 : 1};
position: absolute;
right: 0;
top: 0;
transition: opacity 0.3s ease;
width: 40%;
`;
const StyledGridBottomRightImage = exports.StyledGridBottomRightImage = _styledComponents.default.img`
bottom: 0;
height: 50%;
object-fit: cover;
opacity: ${({
$isHidden
}) => $isHidden ? 0 : 1};
position: absolute;
right: 0;
transition: opacity 0.3s ease;
width: 40%;
`;
//# sourceMappingURL=GridImage.styles.js.map