2020-12-10 13:14:52 +00:00
|
|
|
|
2020-12-15 21:18:16 +00:00
|
|
|
import React, { useState } from 'react';
|
|
|
|
import { Input, View, Button, Link } from 'framework7-react';
|
|
|
|
|
|
|
|
const viewStyle = {
|
|
|
|
height: 30
|
|
|
|
};
|
|
|
|
|
|
|
|
const contentStyle = {
|
|
|
|
flexGrow: 1
|
|
|
|
};
|
2020-12-10 13:14:52 +00:00
|
|
|
|
|
|
|
const CellEditorView = props => {
|
2020-12-15 21:18:16 +00:00
|
|
|
const [expanded, setExpanded] = useState(false);
|
|
|
|
|
|
|
|
const expandClick = e => {
|
|
|
|
setExpanded(!expanded);
|
|
|
|
};
|
|
|
|
|
|
|
|
return <View id="idx-celleditor" style={viewStyle} className={expanded?'expanded':'collapsed'}>
|
|
|
|
<div id="box-cell-name" className="ce-group">
|
2021-01-13 09:48:03 +00:00
|
|
|
<span id="idx-cell-name">{props.cellName}</span>
|
2021-01-30 19:50:17 +00:00
|
|
|
<a href="#" id="idx-btn-function" className="link icon-only" onClick={() => {props.onClickToOpenAddOptions('function', '#idx-btn-function');}}>
|
2021-01-13 09:48:03 +00:00
|
|
|
<i className="icon icon-function" />
|
|
|
|
</a>
|
2020-12-15 21:18:16 +00:00
|
|
|
</div>
|
2021-01-13 09:48:03 +00:00
|
|
|
<div className="ce-group group--content" style={contentStyle}>
|
|
|
|
<textarea id="idx-cell-content" spellCheck="false" />
|
2020-12-15 21:18:16 +00:00
|
|
|
</div>
|
|
|
|
<div className="ce-group">
|
2021-01-13 09:48:03 +00:00
|
|
|
<Link icon="caret" onClick={expandClick} />
|
2020-12-15 21:18:16 +00:00
|
|
|
</div>
|
2020-12-10 13:14:52 +00:00
|
|
|
</View>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export default CellEditorView;
|