Skip to content

Commit

Permalink
Styling adjustments for mutation list
Browse files Browse the repository at this point in the history
  • Loading branch information
trvrb committed Mar 10, 2021
1 parent 4fee777 commit 0a6fb81
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
20 changes: 12 additions & 8 deletions src/components/tree/infoPanels/click.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,18 @@ const MutationTable = ({mutations}) => {
};
// we encode the table here (rather than via `item()`) to set component keys appropriately
return (
Object.entries(mutations)
.sort(geneSortFn)
.map(([gene, muts], index) => (
<tr key={gene}>
<th style={infoPanelStyles.item}>{index===0 ? "Mutations from root" : ""}</th>
<td style={infoPanelStyles.item}>{`${gene}:${muts.sort(mutSortFn).join(", ")}`}</td>
</tr>
))
<tr key={"Mutations"}>
<th style={infoPanelStyles.item}>{"Mutations from root"}</th>
<td style={infoPanelStyles.item}>{
Object.entries(mutations)
.sort(geneSortFn)
.map(([gene, muts]) => (
<div style={{...infoPanelStyles.item, ...{fontWeight: 300}}}>
{gene}: {muts.sort(mutSortFn).join(", ")}
</div>
))
}</td>
</tr>
);
};

Expand Down
3 changes: 2 additions & 1 deletion src/globalStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ export const infoPanelStyles = {
item: {
paddingTop: 4,
paddingBottom: 4,
minWidth: 120
minWidth: 130,
verticalAlign: "top"
},
break: {
marginBottom: "10px"
Expand Down

0 comments on commit 0a6fb81

Please sign in to comment.