Improving Performance

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

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 + '%'
}} />
);
};