({label, colors, onClick, title})
| 59 | } |
| 60 | |
| 61 | function Chip({label, colors, onClick, title}) { |
| 62 | const style = {backgroundColor: colors.bg, color: colors.fg}; |
| 63 | if (onClick) { |
| 64 | return ( |
| 65 | <button |
| 66 | type="button" |
| 67 | className="rt-chip rt-chip-click" |
| 68 | style={style} |
| 69 | onClick={onClick} |
| 70 | title={title} |
| 71 | aria-label={title || label} |
| 72 | > |
| 73 | {label} |
| 74 | </button> |
| 75 | ); |
| 76 | } |
| 77 | return ( |
| 78 | <span className="rt-chip" style={style} title={title}> |
| 79 | {label} |
| 80 | </span> |
| 81 | ); |
| 82 | } |
| 83 | |
| 84 | /* --------------------------- sorting comparator -------------------------- */ |
| 85 |
nothing calls this directly
no outgoing calls
no test coverage detected