All files / src/list/Comment Comment.js

100% Statements 5/5
50% Branches 1/2
100% Functions 2/2
100% Lines 5/5

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 26 27 28 29 30 31 32 33 34 35 36 37 38 39                1x       1x 1x                               1x 1x                
import React, { Component } from 'react';
import { defaultProps } from './props/defaultProps';
import { propTypes } from './props/propTypes';
import { Icon } from '@zohodesk/icons';
import Button from '@zohodesk/components/lib/semantic/Button/Button';
import style from './Comment.module.css';
export default class Comment extends Component {
  constructor(props) {
    super(props);
  }
 
  render() {
    let { count, onClick, className, title } = this.props;
    return (
      <Button
        customClass={`${style.container} ${className} `}
        onClick={onClick}
        dataId='commentLstContainer'
        title={title}
        a11y={{
          ariaLabel: title
        }}
      >
        <Icon name='ZD-TK-commentLine' iconClass={style.commentIcon} />
        {count && <span className={style.count}>{count}</span>}
      </Button>
    );
  }
}
Comment.defaultProps = defaultProps;
Comment.propTypes = propTypes;
 
// if (__DOCS__) {
//   Comment.docs = {
//     folderName: 'List',
//     componentGroup: 'Comment'
//   };
// }