From 0fc8547edb34f18c3b0bc145babcda5ddeddce12 Mon Sep 17 00:00:00 2001 From: atanasster Date: Sun, 9 May 2021 08:22:11 +0300 Subject: [PATCH] fix: heading data title when children string --- ui/components/src/LinkHeading/LinkHeading.tsx | 2 ++ .../__snapshots__/LinkHeading.test.ts.snap | 20 +++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ui/components/src/LinkHeading/LinkHeading.tsx b/ui/components/src/LinkHeading/LinkHeading.tsx index 90d21e840..609600d27 100644 --- a/ui/components/src/LinkHeading/LinkHeading.tsx +++ b/ui/components/src/LinkHeading/LinkHeading.tsx @@ -45,6 +45,8 @@ export const LinkHeading: FC = ({ typeof c === 'string' ? c : Array.isArray(c) ? c.join(' ') : '', ) .join(' ') + : typeof childStrings === 'string' + ? childStrings : linkId); return ( diff --git a/ui/components/src/LinkHeading/__snapshots__/LinkHeading.test.ts.snap b/ui/components/src/LinkHeading/__snapshots__/LinkHeading.test.ts.snap index 1f7b1a7fb..926234817 100644 --- a/ui/components/src/LinkHeading/__snapshots__/LinkHeading.test.ts.snap +++ b/ui/components/src/LinkHeading/__snapshots__/LinkHeading.test.ts.snap @@ -76,11 +76,11 @@ exports[`LinkHeading overview 0 snapshot 1`] = ` class="emotion-1" >