seas-computing / mark-one

A UI component library for building React Apps (in development)
https://seas-computing.github.io/mark-one/
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Update Table Components (Revision) #60

Closed jonseitz closed 4 years ago

jonseitz commented 4 years ago

I made a mistake in #59, leaving in imports from 'Theme' that should have been '../Theme'. I'm also changing the type for rowSpan and colSpan from number to string, since that's closer to how regular html would be written.

With number the usage would have to be:

<TableHeadingCell colSpan={2}>Heading</TableHeadingCell>

While with string the usage would be:

<TableHeadingCell colSpan="2">Heading</TableHeadingCell>
codecov[bot] commented 4 years ago

Codecov Report

Merging #60 into develop will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           develop       #60   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        30           
  Lines          358       358           
  Branches        40        40           
=========================================
  Hits           358       358           
Impacted Files Coverage Δ
src/Tables/Table.tsx 100.00% <ø> (ø)
src/Tables/TableBody.tsx 100.00% <ø> (ø)
src/Tables/TableCell.tsx 100.00% <ø> (ø)
src/Tables/TableHead.tsx 100.00% <ø> (ø)
src/Tables/TableHeadingCell.tsx 100.00% <ø> (ø)
src/Tables/TableRow.tsx 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d6f2fd4...29c6917. Read the comment docs.

jonseitz commented 4 years ago

@rmainseas just highlighting this comment from commit 29c6917:

Upon further reflection, there's a good case for allowing both number and string here, for those times when the colSpan value is coming from a computed value like:

<TableHeadingCell colSpan={columns.length}>Heading</TableHeadingCell>