refactor api

This commit is contained in:
xmcp
2018-08-26 11:25:27 +08:00
parent 8ebc479c47
commit f258ebb058
5 changed files with 114 additions and 68 deletions

View File

@@ -46,7 +46,7 @@ export class HighlightedText extends PureComponent {
<pre>
{parts.map((p,idx)=>(
<span key={idx}>{
PID_RE.test(p) ? <a href={'##'+p} target="_blank">{p}</a> :
PID_RE.test(p) ? <a onClick={()=>{this.props.show_pid(p)}}>{p}</a> :
NICKNAME_RE.test(p) ? <span style={{backgroundColor: this.props.color_picker.get(p)}}>{p}</span> :
p
}</span>