All files / src/list/Icons AddNewIcon.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 24                1x 1x                         1x  
import React from 'react';
import { AddNewIcon_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 AddNewIcon extends React.Component {
  render() {
    let { onClick, dataId, dataTitle, iconClass, className } = 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-SE-addTickets' iconClass={iconClass ? iconClass : ''} />
      </button>
    );
  }
}
AddNewIcon.propTypes = AddNewIcon_propTypes;