/** * A collection of popular layouts and patterns made with CSS (https://csslayout.io) * (c) 2019 - 2020 Nguyen Huu Phuoc */ import React, { useState } from 'react'; import { Helmet } from 'react-helmet'; import RelatedPatterns from '../../components/RelatedPatterns'; import Pattern from '../../constants/Pattern'; import DetailsLayout from '../../layouts/DetailsLayout'; import BrowserFrame from '../../placeholders/BrowserFrame'; const Details: React.FC<{}> = () => { const [checked, setChecked] = useState(false); const toggle = () => setChecked((c) => !c); return (
The checkbox is placed inside a label. So when clicking on the label, the checkbox will be checked even though it's hidden.