You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
	
	
		
			
				
					
						
							|  |  |  | import React, { useContext } from 'react'; | 
					
						
							|  |  |  | import styled, { ThemeContext } from 'styled-components'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import { SessionIconButton, SessionIconSize, SessionIconType } from './icon'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type Props = { | 
					
						
							|  |  |  |   onClick?: () => any; | 
					
						
							|  |  |  |   show?: boolean; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const SessionScrollButtonDiv = styled.div`
 | 
					
						
							|  |  |  |   position: fixed; | 
					
						
							|  |  |  |   z-index: 2; | 
					
						
							|  |  |  |   right: 60px; | 
					
						
							|  |  |  |   animation: fadein ${props => props.theme.common.animations.defaultDuration}; | 
					
						
							|  |  |  | `;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export const SessionScrollButton = (props: Props) => { | 
					
						
							|  |  |  |   const themeContext = useContext(ThemeContext); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return ( | 
					
						
							|  |  |  |     <> | 
					
						
							|  |  |  |       {props.show && ( | 
					
						
							|  |  |  |         <SessionScrollButtonDiv theme={themeContext}> | 
					
						
							|  |  |  |           <SessionIconButton | 
					
						
							|  |  |  |             iconType={SessionIconType.Chevron} | 
					
						
							|  |  |  |             iconSize={SessionIconSize.Huge} | 
					
						
							|  |  |  |             onClick={props.onClick} | 
					
						
							|  |  |  |           /> | 
					
						
							|  |  |  |         </SessionScrollButtonDiv> | 
					
						
							|  |  |  |       )} | 
					
						
							|  |  |  |     </> | 
					
						
							|  |  |  |   ); | 
					
						
							|  |  |  | }; |