All files / packages/design-system/ui/components/dynamic-icons/typing index.jsx

100% Statements 3/3
100% Branches 2/2
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 26 27 28 29 30        2x 5x                               2x                
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
 
const TypingIcon = props => (
  <span
    className={classNames('slds-icon-typing', {
      'slds-is-animated': props.isAnimated,
      'slds-is-paused': props.isPaused
    })}
    title={props.title}
  >
    <span className="slds-icon-typing__dot" />
    <span className="slds-icon-typing__dot" />
    <span className="slds-icon-typing__dot" />
    {props.assistiveText && (
      <span className="slds-assistive-text">{props.assistiveText}</span>
    )}
  </span>
);
 
TypingIcon.propTypes = {
  isAnimated: PropTypes.bool,
  isPaused: PropTypes.bool,
  title: PropTypes.string.isRequired,
  assistiveText: PropTypes.string
};
 
export default TypingIcon;