Skip to content

Commit

Permalink
Adjust column width of token overview table
Browse files Browse the repository at this point in the history
Posted my solution to setting the column width here: mui/material-ui#1911 (comment)
  • Loading branch information
benjaminaaron committed Oct 15, 2019
1 parent 1de581e commit 269cfee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/components/Table.jsx
Expand Up @@ -8,7 +8,11 @@ const Fin4Table = props => {
<TableHead>
<TableRow>
{props.headers.map((key, index) => {
return <TableCell key={index}>{key}</TableCell>;
return (
<TableCell width={(props.colWidths ? props.colWidths[index] : '100') + '%'} key={index}>
{key}
</TableCell>
);
})}
</TableRow>
</TableHead>
Expand Down
2 changes: 1 addition & 1 deletion src/views/token/TokenOverview.jsx
Expand Up @@ -13,7 +13,7 @@ function TokenOverview(props) {
return (
<>
<Box title={t('all-tokens')}>
<Table headers={[t('token-name'), 'Actions']}>
<Table headers={[t('token-name'), 'Actions']} colWidths={[85, 15]}>
{Object.keys(props.fin4Tokens).map((addr, index) => {
let token = props.fin4Tokens[addr];
return (
Expand Down

0 comments on commit 269cfee

Please sign in to comment.