Skip to content

Commit

Permalink
Update styles of species search results table (#1063)
Browse files Browse the repository at this point in the history
- Fixed styles for the header of sortable table columns,
   such that the text of the header is has more weight when the column sorting is active
- Added centered text alignment for the dots in the species results table
- Fixed the occasionally disappearing background of the header of DataTable
  • Loading branch information
azangru authored Dec 11, 2023
1 parent 0343462 commit 1e77120
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@
color: $medium-dark-grey;
--dot-solid-color: #{$medium-light-grey};
}

.centered {
text-align: center;
}
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ const SpeciesSearchResultsTable = (props: Props) => {
? formatNumber(searchMatch.contig_n50)
: '-'}
</td>
<td>
<td className={styles.centered}>
{searchMatch.has_variation ? <SolidDot /> : <EmptyDot />}
</td>
<td>
<td className={styles.centered}>
{searchMatch.has_regulation ? <SolidDot /> : <EmptyDot />}
</td>
<td>{searchMatch.annotation_provider}</td>
Expand Down
11 changes: 2 additions & 9 deletions src/shared/components/data-table/DataTable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,16 @@
}

.table {
--table-background: $white;
--table-background: #{$white};

thead {
tr {
background-color: $white;
z-index: 1;
}
}

&ThemeDark {
--table-background: $light-grey;

thead {
tr {
background-color: $light-grey;
}
}
--table-background: #{$light-grey};
}

td {
Expand Down
4 changes: 2 additions & 2 deletions src/shared/components/table/ColumnHead.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
align-items: baseline;
justify-content: start;
column-gap: var( --_sort-arrow-right-margin);
font-weight: $light;
font-weight: inherit;
text-align: left;
}

.columnHeadSortingApplied {
font-weight: $bold;
--table-head-font-weight: #{$normal};
}

.sortArrow {
Expand Down

0 comments on commit 1e77120

Please sign in to comment.