Skip to content

Commit

Permalink
fix: title for Tabs should be props.hint if provided (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raubzeug authored Dec 18, 2023
1 parent 29e005e commit 9284c2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/AdaptiveTabs/AdaptiveTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export interface TabProps {
class Tab extends React.Component<TabProps> {
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
<div
Expand Down

0 comments on commit 9284c2f

Please sign in to comment.