width: innerWidth()

in src/utils/Margin.js [43:70]


    width: innerWidth(width, margin),
    height: innerHeight(height, margin),
  };
}

export function innerRangeX(outerWidth, margin = {}) {
  const left = getFuzzy(margin, 'left') || 0;
  return [
    Math.min(left, outerWidth),
    Math.min(left + innerWidth(outerWidth, margin), outerWidth),
  ];
}
export function innerRangeY(outerHeight, margin = {}) {
  const top = getFuzzy(margin, 'top') || 0;
  return [
    Math.min(top + innerHeight(outerHeight, margin), outerHeight),
    Math.min(top, outerHeight),
  ];
}

export function prefixKeys(obj, prefix) {
  if (!prefix) return obj;
  return mapKeys(obj, (value, key) => prefix + upperFirst(key));
}

// TODO this isn't used anywhere, deprecate?
export function maxMargins(margins = [], keyPrefix) {
  return margins.reduce((result, margin) => {