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.
		
		
		
		
		
			
		
			
				
	
	
		
			27 lines
		
	
	
		
			801 B
		
	
	
	
		
			TypeScript
		
	
			
		
		
	
	
			27 lines
		
	
	
		
			801 B
		
	
	
	
		
			TypeScript
		
	
| import React from 'react';
 | |
| import { SessionIcon, SessionIconType } from '../icon';
 | |
| import { PanelButton, PanelButtonProps, StyledContent, StyledText } from './PanelButton';
 | |
| 
 | |
| interface PanelIconButton extends Omit<PanelButtonProps, 'children'> {
 | |
|   iconType: SessionIconType;
 | |
|   text: string;
 | |
| }
 | |
| 
 | |
| export const PanelIconButton = (props: PanelIconButton) => {
 | |
|   const { iconType, text, disabled = false, noBackgroundColor, onClick, dataTestId } = props;
 | |
| 
 | |
|   return (
 | |
|     <PanelButton
 | |
|       disabled={disabled}
 | |
|       noBackgroundColor={noBackgroundColor}
 | |
|       onClick={onClick}
 | |
|       dataTestId={dataTestId}
 | |
|     >
 | |
|       <StyledContent disabled={disabled}>
 | |
|         <SessionIcon iconType={iconType} iconSize="medium" />
 | |
|         <StyledText>{text}</StyledText>
 | |
|       </StyledContent>
 | |
|     </PanelButton>
 | |
|   );
 | |
| };
 |