All files / src/list/Icons EditIcon.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 25                1x 1x                           1x  
import React from 'react';
import { EditIcon_propTypes } from './props/propTypes';
import style from './Icons.module.css';
import { Icon } from '@zohodesk/icons';
import btnStyle from '@zohodesk/components/lib/semantic/Button/semanticButton.module.css';
 
export default class EditIcon extends React.Component {
  render() {
    let { onClick, dataId, dataTitle, iconClass, iconSize, 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}
        aria-label={dataTitle}
      >
        <Icon name='ZD-GN-edit' iconClass={iconClass ? iconClass : ''} size={iconSize} />
      </button>
    );
  }
}
EditIcon.propTypes = EditIcon_propTypes;