Skip to content

Commit

Permalink
feat: removed reserved space for empty titles in vega_card h2oai#1923
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasOz authored and mturoci committed Oct 3, 2023
1 parent 2a971a3 commit 657d6da
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ui/src/vega.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,15 @@ export const
const { specification, data, title, grammar = 'vega-lite' } = state
return (
<div data-test={name} className={css.card}>
<div className='wave-s12 wave-w6'>{title}</div>
{title && <div className='wave-s12 wave-w6'>{title}</div>}
{title &&
<div className={css.body}>
<XVegaVisualization model={{ specification, data, grammar }} />
</div>
</div>}
{!title &&
<div className={css.body} style={{marginTop: 0}}>
<XVegaVisualization model={{ specification, data, grammar }} />
</div>}
</div>
)
}
Expand Down

0 comments on commit 657d6da

Please sign in to comment.