MCPcopy Create free account
hub / github.com/adobe/react-spectrum / measuredTableLayout

Function measuredTableLayout

perf/drivers.mjs:287–298  ·  view source on GitHub ↗
(size, labels = 300, name = 150, width = 1000)

Source from the content-addressed store, hash-verified

285// `labels` is a pixel width, or 'fit' to share the flexible width equally with the
286// review column, so container resizes rewrap labels and change row heights.
287const measuredTableLayout = (size, labels = 300, name = 150, width = 1000) => {
288 let flexible = width - 2 - name - 450;
289 let [labelsWidth, review] =
290 labels === 'fit' ? [flexible / 2, flexible / 2] : [labels, flexible - labels];
291 return {
292 viewport: '.measured-table',
293 width,
294 total: size,
295 atTop: true,
296 columns: [name, labelsWidth, 90, 90, 90, 90, 90, review]
297 };
298};
299const labelsWidth = width =>
300 condition('.measured-table [data-column="labels"]', {
301 style: {property: 'width', value: `${width}px`}

Callers 2

resizeMeasuredTableFunction · 0.85
drivers.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected