Skip to content

Commit d2db8ee

Browse files
committed
refactor: update SidePanelDocumentation and DiscoverCharts to use DocLink component
1 parent c98090e commit d2db8ee

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

src/components/charts/list/DiscoverCharts.tsx

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -753,15 +753,12 @@ const ChartListHeader = ({ charts }) => {
753753
</h3>
754754
<p className="mb-0 mt-4 pl-20" data-testid="chart-store-list-subheading">
755755
Select chart to deploy. &nbsp;
756-
<a
757-
href={getDocumentationUrl({ docLinkKey: 'CHART_GROUP' })}
758-
rel="noreferrer noopener"
759-
target="_blank"
760-
className="dc__link"
761-
data-testid="chart-group-link"
762-
>
763-
Learn more about chart groups
764-
</a>
756+
<DocLink
757+
dataTestId="chart-group-link"
758+
docLinkKey="CHART_GROUP"
759+
text="Learn more about chart groups"
760+
fontWeight="normal"
761+
/>
765762
</p>
766763
</div>
767764
)
@@ -790,15 +787,12 @@ export const EmptyChartGroup = ({
790787
{subTitle || 'Use chart groups to preconfigure and deploy frequently used charts together.'}
791788
</div>
792789
{!removeLearnMore && (
793-
<a
794-
href={getDocumentationUrl({ docLinkKey: 'CHART_GROUP' })}
795-
rel="noreferrer noopener"
796-
target="_blank"
797-
className="dc__link"
798-
data-testid="chart-group-link"
799-
>
800-
Learn more about chart groups
801-
</a>
790+
<DocLink
791+
dataTestId="chart-group-link"
792+
docLinkKey="CHART_GROUP"
793+
text="Learn more about chart groups"
794+
fontWeight="normal"
795+
/>
802796
)}
803797
{typeof onClickViewChartButton === 'function' ? (
804798
<button type="button" onClick={onClickViewChartButton} className="cta ghosted flex mb-24 mt-24">

src/components/common/SidePanel/SidePanel.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@
1212
}
1313
}
1414
}
15+
16+
.side-panel-documentation {
17+
&__header {
18+
flex: 0 0 48px;
19+
}
20+
}

src/components/common/SidePanel/SidePanelDocumentation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const SidePanelDocumentation = ({ onClose }: SidePanelDocumentationProps)
3030

3131
return (
3232
<>
33-
<div className="px-16 pt-12 pb-11 border__primary--bottom flex dc__gap-12 dc__no-shrink">
33+
<div className="side-panel-documentation__header px-16 pt-12 pb-11 border__primary--bottom flex dc__gap-12">
3434
<Icon name="ic-book-open" color="N900" />
3535
<h2 className="m-0 fs-16 lh-1-5 fw-6 cn-9 flex-grow-1">Documentation</h2>
3636
<div className="flex dc__gap-8">

0 commit comments

Comments
 (0)