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 | 2x 56x 2x 2x 56x 56x | // @flow import React from 'react'; const Tag = (props: Object) => { const onRemoveClick = (e: MouseEvent) => { e.preventDefault(); props.onRemoveTag(e); }; const removeIcon: ?React$Element<any> = !props.readOnly ? ( <a onClick={onRemoveClick}> {props.removeTagIcon|| String.fromCharCode(215)} </a> ) : null; return ( <li> {props.name} {removeIcon} </li> ); }; export default Tag; |