(size, labels = 300, name = 150, width = 1000)
| 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. |
| 287 | const 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 | }; |
| 299 | const labelsWidth = width => |
| 300 | condition('.measured-table [data-column="labels"]', { |
| 301 | style: {property: 'width', value: `${width}px`} |
no outgoing calls
no test coverage detected