From 9284c2fc4910951d343933b37c99720bfa3e8974 Mon Sep 17 00:00:00 2001 From: Hellen Date: Mon, 18 Dec 2023 19:32:41 +0300 Subject: [PATCH] fix: title for Tabs should be props.hint if provided (#130) --- src/components/AdaptiveTabs/AdaptiveTabs.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AdaptiveTabs/AdaptiveTabs.tsx b/src/components/AdaptiveTabs/AdaptiveTabs.tsx index 50cccc51..67a95b39 100644 --- a/src/components/AdaptiveTabs/AdaptiveTabs.tsx +++ b/src/components/AdaptiveTabs/AdaptiveTabs.tsx @@ -66,7 +66,7 @@ export interface TabProps { class Tab extends React.Component { render() { const {active, disabled, hint, title = this.props.id} = this.props; - const stringTitle = (hint || typeof title === 'string' ? title : '') as string; + const stringTitle = hint ?? ((typeof title === 'string' && title) || ''); return ( // eslint-disable-next-line jsx-a11y/click-events-have-key-events