import clsx from 'clsx'; import React from 'react'; import AnswerIcon from '../../assets/images/Answer.svg'; import EndIcon from '../../assets/images/End.svg'; import HoldIcon from '../../assets/images/Hold.svg'; import CircleButton from '../CircleButton'; import styles from './styles.scss'; type MultiCallAnswerButtonProps = { title: string; className?: string; onClick: (...args: any[]) => void; isEndOtherCall?: boolean; width?: string; height?: string; x?: number; y?: number; }; const MultiCallAnswerButton: React.FC = (props) => { const Icon = props.isEndOtherCall ? EndIcon : HoldIcon; const iconClassName = clsx( styles.button, props.isEndOtherCall ? styles.endButton : '', ); const text = props.title.split('\n').map((line, index) => ( {line} )); return ( {text} ); }; MultiCallAnswerButton.defaultProps = { // @ts-expect-error TS(2322): Type 'null' is not assignable to type 'string | un... Remove this comment to see the full error message className: null, isEndOtherCall: true, width: '100%', height: '100%', x: 0, y: 0, }; export default MultiCallAnswerButton;