From b3a323efa1fc5d942c2f7052f585acc248394f44 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 15 Oct 2018 12:20:30 +0100 Subject: fix: Nested a tag warning in console by not rendering a tags within type definition popovers --- .../react-shared/src/components/anchor_title.tsx | 34 +++++++++++++--------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'packages/react-shared') diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx index dabdfff9b..0bdf61d44 100644 --- a/packages/react-shared/src/components/anchor_title.tsx +++ b/packages/react-shared/src/components/anchor_title.tsx @@ -15,6 +15,7 @@ export interface AnchorTitleProps { id: string; headerSize: HeaderSizes; shouldShowAnchor: boolean; + isDisabled?: boolean; } export interface AnchorTitleState { @@ -40,6 +41,9 @@ const styles: Styles = { }; export class AnchorTitle extends React.Component { + public static defaultProps: Partial = { + isDisabled: false, + }; constructor(props: AnchorTitleProps) { super(props); this.state = { @@ -67,20 +71,22 @@ export class AnchorTitle extends React.Component {this.props.title} - - - + {!this.props.isDisabled && ( + + + + )} ); } -- cgit