Skip to content

Commit

Permalink
feat: Show title and description in published chart
Browse files Browse the repository at this point in the history
  • Loading branch information
bprusinowski committed Dec 8, 2023
1 parent d433e99 commit 0d9c5d6
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions app/components/chart-published.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,33 @@ export const ChartPublished = (props: ChartPublishedProps) => {
</ChartPanelLayout>
</>
) : (
<ChartWrapper layout={state.layout}>
<ChartPublishedInner
dataSource={dataSource}
state={state}
chartConfig={getChartConfig(state)}
configKey={configKey}
/>
</ChartWrapper>
<>
<Flex
sx={{
flexDirection: "column",
mb:
state.layout.meta.title[locale] ||
state.layout.meta.description[locale]
? 4
: 0,
}}
>
{state.layout.meta.title[locale] && (
<Title text={state.layout.meta.title[locale]} />
)}
{state.layout.meta.description[locale] && (
<Description text={state.layout.meta.description[locale]} />
)}
</Flex>
<ChartWrapper layout={state.layout}>
<ChartPublishedInner
dataSource={dataSource}
state={state}
chartConfig={getChartConfig(state)}
configKey={configKey}
/>
</ChartWrapper>
</>
)}
</ChartTablePreviewProvider>
);
Expand Down

0 comments on commit 0d9c5d6

Please sign in to comment.