Improving Performance

This commit is contained in:
YourWishes committed 2018-08-13 19:40:34 +10:00
1 parent 1ee3dee3c3
commit 550cf15e76
9 files changed
+67 -7

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import React from 'react';
export default (props) => {
let height = 100;/* Percentage of width */
//TODO: Add more methods of resizing this box.
if(props.ratioWidth && props.ratioHeight) {
height = 100 / props.ratioWidth * props.ratioHeight;
}
//Box Sizer
return (
<div className="o-box-sizer" style={{
paddingBottom: height + '%'
}} />
);
};