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.
		
		
		
		
		
			
		
			
				
	
	
		
			33 lines
		
	
	
		
			740 B
		
	
	
	
		
			TypeScript
		
	
			
		
		
	
	
			33 lines
		
	
	
		
			740 B
		
	
	
	
		
			TypeScript
		
	
import React from 'react';
 | 
						|
import { useSelector } from 'react-redux';
 | 
						|
import styled from 'styled-components';
 | 
						|
import { getShowScrollButton } from '../../state/selectors/conversations';
 | 
						|
 | 
						|
import { SessionIconButton } from './icon';
 | 
						|
 | 
						|
type Props = {
 | 
						|
  onClick?: () => any;
 | 
						|
};
 | 
						|
 | 
						|
const SessionScrollButtonDiv = styled.div`
 | 
						|
  position: fixed;
 | 
						|
  z-index: 2;
 | 
						|
  right: 60px;
 | 
						|
  animation: fadein var(--default-duration);
 | 
						|
`;
 | 
						|
 | 
						|
export const SessionScrollButton = (props: Props) => {
 | 
						|
  const show = useSelector(getShowScrollButton);
 | 
						|
 | 
						|
  return (
 | 
						|
    <SessionScrollButtonDiv>
 | 
						|
      <SessionIconButton
 | 
						|
        iconType="chevron"
 | 
						|
        iconSize={'huge'}
 | 
						|
        isHidden={!show}
 | 
						|
        onClick={props.onClick}
 | 
						|
      />
 | 
						|
    </SessionScrollButtonDiv>
 | 
						|
  );
 | 
						|
};
 |