All files / src/list/Icons CompleteIcon.js

100% Statements 3/3
50% Branches 2/4
100% Functions 1/1
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23              1x 1x                         1x  
import React from 'react';
import { CompleteIcon_propTypes } from './props/propTypes';
import { Icon } from '@zohodesk/icons';
import style from './Icons.module.css';
import btnStyle from '@zohodesk/components/lib/semantic/Button/semanticButton.module.css';
export default class CompleteIcon extends React.Component {
  render() {
    let { onClick, dataId, dataTitle, iconClass, className, iconSize } = this.props;
    return (
      <button
        onClick={onClick}
        className={`${style.iconStyle} ${style.blueHover} ${className ? className : ''} ${btnStyle.buttonReset}`}
        data-id={dataId}
        data-test-id={dataId}
        data-title={dataTitle}
      >
        <Icon name='ZD-GN-checkbox' iconClass={iconClass ? iconClass : ''} size={iconSize} />
      </button>
    );
  }
}
CompleteIcon.propTypes = CompleteIcon_propTypes;