Improved styles for timeline and card

This commit is contained in:
Lachlan Kermode
2022-03-07 09:11:30 -05:00
parent c1c3c1a2db
commit 330a7c56d0
9 changed files with 21 additions and 23 deletions

View File

@@ -146,15 +146,12 @@ class CardStack extends React.Component {
render() {
const { isCardstack, selected, narrative, timelineDims } = this.props;
// TODO: make '237px', which is the narrative header, less hard-coded
const height = `calc(100% - 237px - ${timelineDims.height}px)`;
if (selected.length > 0) {
if (!narrative) {
return (
<div
id="card-stack"
className={`card-stack
${isCardstack ? "" : " folded"}`}
className={`card-stack ${isCardstack ? "" : " folded"}`}
>
{this.renderCardStackHeader()}
{this.renderCardStackContent()}
@@ -167,7 +164,6 @@ class CardStack extends React.Component {
ref={this.refCardStack}
className={`card-stack narrative-mode
${isCardstack ? "" : " folded"}`}
style={{ height }}
>
{this.renderNarrativeContent()}
</div>