UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

21 lines (20 loc) 564 B
const i = { // Approximate effective width of each header IconButton (icon + padding) pin: 28, help: 28, spacing: 4, // gap between elements padding: 4 // container padding }; function h(a, c, n) { const e = c?.type?.format === "date-time" ? 215 : 175, d = a.length * 11; let t = 0; n?.showPinIcon && (t += i.pin + i.spacing), n?.hasDescription && (t += i.help + i.spacing), t > 0 && (t += i.padding); const o = d + t; return Math.max(e, o); } export { h as calculateDefaultColumnWidth }; //# sourceMappingURL=calculateColumnWidth.js.map