UNPKG

react-simple-game-engine

Version:

[WIP] not able to use in currently. <!-- Document cumming soon... -->

22 lines (21 loc) 915 B
var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; import { jsx as _jsx } from "react/jsx-runtime"; import { getClassName } from "../utils"; export function ScalerContainer(_a) { var width = _a.width, height = _a.height, value = _a.value, children = _a.children; return (_jsx("div", __assign({ className: getClassName("scaler-container") }, { children: _jsx("div", __assign({ style: { width: width, height: height, transform: "scale(".concat(value, ") translate(-50%, -50%)"), } }, { children: children })) }))); }