web-apps/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx

37 lines
1.2 KiB
React
Raw Normal View History

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">
<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');}}>
<i className="icon icon-function" />
</a>
2020-12-15 21:18:16 +00:00
</div>
<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">
<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;