2015-08-06 13:56:37 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import React from 'react';
|
2016-05-09 11:12:46 +02:00
|
|
|
|
2015-08-06 13:56:37 +02:00
|
|
|
|
|
|
|
let ActionPanel = React.createClass({
|
|
|
|
propTypes: {
|
2016-05-09 11:12:46 +02:00
|
|
|
buttons: React.PropTypes.element,
|
2015-08-10 11:57:38 +02:00
|
|
|
content: React.PropTypes.oneOfType([
|
|
|
|
React.PropTypes.string,
|
|
|
|
React.PropTypes.element
|
|
|
|
]),
|
2015-09-08 10:15:26 +02:00
|
|
|
leftColumnWidth: React.PropTypes.string,
|
2016-05-09 11:12:46 +02:00
|
|
|
onClick: React.PropTypes.func,
|
2015-09-08 10:15:26 +02:00
|
|
|
rightColumnWidth: React.PropTypes.string
|
2015-08-06 13:56:37 +02:00
|
|
|
},
|
2015-09-08 10:15:26 +02:00
|
|
|
|
2015-08-06 13:56:37 +02:00
|
|
|
render() {
|
2016-05-09 11:12:46 +02:00
|
|
|
const { buttons, content, leftColumnWidth, onClick, rightColumnWidth } = this.props;
|
2015-09-08 10:15:26 +02:00
|
|
|
|
2015-08-06 13:56:37 +02:00
|
|
|
return (
|
2016-05-09 11:12:46 +02:00
|
|
|
<div
|
|
|
|
className={'ascribe-panel-wrapper'}
|
|
|
|
onClick={onClick}>
|
2015-09-08 10:15:26 +02:00
|
|
|
<div
|
|
|
|
className="ascribe-panel-table"
|
|
|
|
style={{width: leftColumnWidth}}>
|
2015-08-10 09:22:39 +02:00
|
|
|
<div className="ascribe-panel-content">
|
2016-05-09 11:12:46 +02:00
|
|
|
{content}
|
2015-08-07 11:27:44 +02:00
|
|
|
</div>
|
2015-08-10 09:22:39 +02:00
|
|
|
</div>
|
2015-09-08 10:15:26 +02:00
|
|
|
<div
|
|
|
|
className="ascribe-panel-table"
|
|
|
|
style={{width: rightColumnWidth}}>
|
2015-08-10 09:22:39 +02:00
|
|
|
<div className="ascribe-panel-content">
|
2016-05-09 11:12:46 +02:00
|
|
|
{buttons}
|
2015-08-07 11:27:44 +02:00
|
|
|
</div>
|
2015-08-06 13:56:37 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2016-05-09 11:12:46 +02:00
|
|
|
export default ActionPanel;
|