message: refactor child generation
diff: @@ -2,14 +2,15 @@ import React from 'react'
  import PropTypes from 'prop-types'
  import classnames from 'classnames'
  -const CircleBadge = ({tag: Tag = 'div', alt = '', size = 'medium', src, bg, children, ...rest}) => {
  - const generateContent = () => {
  - if (src) {
  - return <img className="CircleBadge-icon" alt={alt} src={src} />
  - } else if (children) {
  - return <div className="CircleBadge-icon">{children}</div>
  - } else return null
  +const CircleBadge = ({tag: Tag = 'div', size = 'medium', bg, children, ...rest}) => {
  + const generateContent = () => React.children.map(children, child => {
  + const {className = '', ...rest} = child.props
  + const newProps = {...rest}
  + if (!className || !className.includes('CircleBadge-icon')) {
  + newProps.className = classnames('CircleBadge-icon', className)
  }
  + return React.cloneElement(child, newProps)
  + })
  const classes = classnames('CircleBadge', `CircleBadge--${size}`, bg && `bg-${bg}`)
  return (
  <Tag className={classes} {...rest}>
  