mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-26 20:18:41 +03:00
WIP: filters as narratives always
This commit is contained in:
19
src/components/StateOptions.jsx
Normal file
19
src/components/StateOptions.jsx
Normal 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>
|
||||
}
|
||||
Reference in New Issue
Block a user