MCPcopy Create free account
hub / github.com/flyfloor/react-component / render

Function render

component/ConfirmBox.js:46–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 },
45
46 render() {
47 let {confirmBtn, cancelBtn, position, className, content, style, children} = this.props;
48 const {open} = this.state;
49 className = klassName('confirm-box popup', className);
50 if (open) {
51 className = `${className} _active`;
52 }
53
54 return (
55 <span className={className} style={style} onClick={this.onTrigger}>
56 <span className="_trigger" ref='trigger'>
57 {children}
58 </span>
59 <div className={'_wrap _' + position}>
60 <div ref='content' className='_content'>
61 <div className="_title">{content}</div>
62 <div className="_action">
63 <div className="_confirm" onClick={this.handleConfirm}>
64 {confirmBtn ?
65 confirmBtn
66 : <div>ok</div>}
67 </div>
68 <div className="_cancel" onClick={this.handleCancel}>
69 {cancelBtn ?
70 cancelBtn
71 : <div>cancel</div>}
72 </div>
73 </div>
74 <span className="_arrow" ref='arrow'></span>
75 </div>
76 </div>
77 </span>
78 );
79 }
80});
81
82module.exports = ConfirmBox;

Callers

nothing calls this directly

Calls 1

klassNameFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…