File tree 2 files changed +17
-16
lines changed
2 files changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ export const Chatbot: React.FunctionComponent<ChatbotProps> = ({
50
50
initial = "hidden"
51
51
animate = { isVisible ? 'visible' : 'hidden' }
52
52
>
53
- { children }
53
+ { isVisible ? children : undefined }
54
54
</ motion . div >
55
55
) ;
56
56
} ;
Original file line number Diff line number Diff line change @@ -18,20 +18,21 @@ export interface JumpButtonProps {
18
18
isHidden ?: boolean ;
19
19
}
20
20
21
- const JumpButton : React . FunctionComponent < JumpButtonProps > = ( { position, isHidden, onClick } : JumpButtonProps ) => (
22
- < Tooltip id = { `pf-chatbot__tooltip--jump-${ position } ` } content = { `Back to ${ position } ` } position = "top" >
23
- < Button
24
- variant = "plain"
25
- className = { `pf-chatbot__jump pf-chatbot__jump--${ position } ${ isHidden && `pf-chatbot__jump--${ position } --hidden` } ` }
26
- aria-label = { `Jump ${ position } button` }
27
- aria-describedby = { `pf-chatbot__tooltip--jump-${ position } ` }
28
- onClick = { onClick }
29
- >
30
- < Icon iconSize = "xl" isInline >
31
- { position === 'top' ? < ArrowUpIcon /> : < ArrowDownIcon /> }
32
- </ Icon >
33
- </ Button >
34
- </ Tooltip >
35
- ) ;
21
+ const JumpButton : React . FunctionComponent < JumpButtonProps > = ( { position, isHidden, onClick } : JumpButtonProps ) =>
22
+ isHidden ? undefined : (
23
+ < Tooltip id = { `pf-chatbot__tooltip--jump-${ position } ` } content = { `Back to ${ position } ` } position = "top" >
24
+ < Button
25
+ variant = "plain"
26
+ className = { `pf-chatbot__jump pf-chatbot__jump--${ position } ${ isHidden && `pf-chatbot__jump--${ position } --hidden` } ` }
27
+ aria-label = { `Jump ${ position } button` }
28
+ aria-describedby = { `pf-chatbot__tooltip--jump-${ position } ` }
29
+ onClick = { onClick }
30
+ >
31
+ < Icon iconSize = "xl" isInline >
32
+ { position === 'top' ? < ArrowUpIcon /> : < ArrowDownIcon /> }
33
+ </ Icon >
34
+ </ Button >
35
+ </ Tooltip >
36
+ ) ;
36
37
37
38
export default JumpButton ;
You can’t perform that action at this time.
0 commit comments