import React from 'react' ; import * as Styled from './Button.styles' ; import { FiChevronLeft , FiChevronRight , FiThumbsUp } from 'react-icons/fi' ; export interface Props extends React . ComponentPropsWithoutRef < 'button' > { variant : 'standardBtn' | 'likeBtn' ; withChevron : boolean ; withLeftChevron ? : boolean ; } function param { string } variant param { boolean } withChevron param { boolean } withLeftChevron param { ReactNode } children param { rest } rest returns { JSX . Element } const Button = ( { withChevron , variant , children , withLeftChevron , ... rest } ) : JSX . Element => { return ( < Styled . GenericButton variant = { variant } { ... rest } > { variant === 'likeBtn' && < FiThumbsUp className = "icon" / > } { withLeftChevron && < FiChevronLeft className = "icon" / > } { children } { withChevron && < FiChevronRight className = "icon" / > } < /Styled.GenericButton>); } ; export default Button ;