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.
		
		
		
		
		
			
		
			
				
	
	
		
			32 lines
		
	
	
		
			1012 B
		
	
	
	
		
			TypeScript
		
	
			
		
		
	
	
			32 lines
		
	
	
		
			1012 B
		
	
	
	
		
			TypeScript
		
	
| import styled from 'styled-components';
 | |
| import { SessionIcon, SessionIconType } from '../icon';
 | |
| import { PanelButton, PanelButtonProps, PanelButtonText, StyledContent } from './PanelButton';
 | |
| 
 | |
| interface PanelIconButton extends Omit<PanelButtonProps, 'children'> {
 | |
|   iconType: SessionIconType;
 | |
|   text: string;
 | |
|   subtitle?: string;
 | |
|   color?: string;
 | |
| }
 | |
| 
 | |
| const IconContainer = styled.div`
 | |
|   flex-shrink: 0;
 | |
|   margin: 0 var(--margins-lg) 0 var(--margins-sm);
 | |
|   padding: 0;
 | |
| `;
 | |
| 
 | |
| export const PanelIconButton = (props: PanelIconButton) => {
 | |
|   const { iconType, text, subtitle, color, disabled = false, onClick, dataTestId } = props;
 | |
| 
 | |
|   return (
 | |
|     <PanelButton disabled={disabled} onClick={onClick} dataTestId={dataTestId}>
 | |
|       <StyledContent disabled={disabled}>
 | |
|         <IconContainer>
 | |
|           <SessionIcon iconType={iconType} iconColor={color} iconSize="large" />
 | |
|         </IconContainer>
 | |
|         <PanelButtonText text={text} subtitle={subtitle} color={color} />
 | |
|       </StyledContent>
 | |
|     </PanelButton>
 | |
|   );
 | |
| };
 |