WIP: filters as narratives always

This commit is contained in:
Lachlan Kermode
2020-06-19 14:49:22 +02:00
parent 442d8ea5d7
commit 973619d178
7 changed files with 118 additions and 16 deletions

View File

@@ -0,0 +1,19 @@
import React, { useState } from 'react'
export default ({ showing, onClickHandler, timelineDims }) => {
const [checked, setChecked] = useState(true)
const handleCheck = () => setChecked(!checked)
const onNarrativise = () => onClickHandler(checked)
if (!showing) {
return null
}
return <div className='stateoptions-panel' style={{ bottom: timelineDims.height }}>
<div>
<div className='button' onClick={onNarrativise}>Narrativise</div>
<label for='withlines'>Connect by lines</label>
<input name='withlines' onClick={handleCheck} checked={checked} type='checkbox' />
</div>
</div>
}