UNPKG

react-aspect-ratio

Version:

React Component to maintain a consistent width-to-height ratio (aspect ratio), preventing cumulative layout shift.

17 lines (16 loc) 466 B
(function (global, factory) { if (typeof define === "function" && define.amd) { define(["exports"], factory); } else if (typeof exports !== "undefined") { factory(exports); } else { var mod = { exports: {} }; factory(mod.exports); global.types = mod.exports; } })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) { "use strict"; _exports.__esModule = true; });