fix height of the table

This commit is contained in:
Riley Davis
2017-03-01 11:14:13 -07:00
parent 45b14d026d
commit 00b2bf37ee
3 changed files with 17 additions and 3 deletions
@@ -40,7 +40,11 @@ const FlagWidget = (props) => {
</tr>
);
})
: <tr><td colSpan="2">{lang.t('dashboard.no_flags')}</td></tr>
: <tr className={styles.rowLinkify}><td colSpan="2">{lang.t('dashboard.no_flags')}</td></tr>
}
{ /* rows in a table with a fixed height will expand and ignore height.
this extra row will expand to fill the extra space. */
assets.length < 10 ? <tr></tr> : null
}
</tbody>
</table>
@@ -26,7 +26,7 @@ const LikeWidget = (props) => {
? assets.map(asset => {
const likeSummary = asset.action_summaries.find(s => s.type === 'LikeAssetActionSummary');
return (
<tr key={asset.id}>
<tr className={styles.rowLinkify} key={asset.id}>
<td>
<Link className={styles.linkToAsset} to={`/admin/moderate/flagged/${asset.id}`}>
<p className={styles.assetTitle}>{asset.title}</p>
@@ -41,7 +41,11 @@ const LikeWidget = (props) => {
</tr>
);
})
: <tr><td colSpan="2">{lang.t('dashboard.no_likes')}</td></tr>
: <tr className={styles.rowLinkify}><td colSpan="2">{lang.t('dashboard.no_likes')}</td></tr>
}
{ /* rows in a table with a fixed height will expand and ignore height.
this extra row will expand to fill the extra space. */
assets.length < 10 ? <tr></tr> : null
}
</tbody>
</table>
@@ -1,3 +1,7 @@
:root {
--row-height: 80px;
}
.widget {
box-sizing: border-box;
margin: 10px 5px 5px 5px;
@@ -18,6 +22,7 @@
width: 100%;
border-collapse: collapse;
user-select: none;
height: calc(var(--row-height) * 10);
}
.widgetTable thead th {
@@ -35,6 +40,7 @@
cursor: pointer;
border-bottom: 1px solid lightgrey;
color: #555;
height: var(--row-height);
}
.rowLinkify:last-child {