Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Removes the
Table
component and reverts to using class-based styles on standard html table elements.Reason: There was no need for the overhead of a component at this stage, with all the prop passing and data typing, when all we're doing is applying styles.
Once I started using the table component for something more complex than displaying tabular data (i.e. the search history) I found there would be too may edge cases and complexity was ballooning.
I think we're better served with the following:
<table>
and associated elements e.g.<td>
which are all styled when the.table-styles
class is applied to the<table>
for all non-interactive tabular datadiv class="grid"
and tailoring the component to the context.Example: in the search history, the rows needed to be clickable. Using a
<a>
as a child of<tbody>
is not valid. Adding anonclick
to the<tr>
works, but is not accessible and hard to conditionally style (i.e. showing a pointer cursor only when the row is clickable). So in this case, I used a grid of links styled with the.table-row-styles
class to match the appearance of a default table.This allows for flexibility when needed while keeping simplicity in the base
<table>
and maintaining consistent styles throughout