mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-28 13:08:42 +03:00
Using prettier for linting
This commit is contained in:
@@ -1,19 +1,28 @@
|
||||
import React, { useState } from 'react'
|
||||
import React, { useState } from "react";
|
||||
|
||||
export default ({ showing, onClickHandler, timelineDims }) => {
|
||||
if (!showing) {
|
||||
return null
|
||||
return null;
|
||||
}
|
||||
|
||||
const [checked, setChecked] = useState(false)
|
||||
const handleCheck = () => setChecked(!checked)
|
||||
const onNarrativise = () => onClickHandler(checked)
|
||||
const [checked, setChecked] = useState(false);
|
||||
const handleCheck = () => setChecked(!checked);
|
||||
const onNarrativise = () => onClickHandler(checked);
|
||||
|
||||
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' />
|
||||
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>
|
||||
</div>
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user