Repository URL to install this package:
|
Version:
3.12.2 ▾
|
import { LAYOUTS_IDS } from './constants';
var getItemPreviewWidthAndHeight = function getItemPreviewWidthAndHeight(viewLayout) {
var isListView = viewLayout === LAYOUTS_IDS.LIST;
var baseWidth = isListView ? 100 : 200;
var baseHeight = isListView ? 70 : 150;
var width = parseInt(baseWidth * devicePixelRatio);
var height = parseInt(baseHeight * devicePixelRatio);
return [width, height];
};
export default getItemPreviewWidthAndHeight;