Sha256: d64be9b6b92d55b7f0292d371ca2e59501b414d2c25fdf7c89bf6426fc8b0f09
Contents?: true
Size: 688 Bytes
Versions: 3
Compression:
Stored size: 688 Bytes
Contents
import React from "react"; interface TagProps { enabled: boolean, tag: string, toggleEnabled: (string) => void } export default function Tag(props: TagProps): JSX.Element { const handleChange = () => { props.toggleEnabled(props.tag); }; const classes = ["tag"]; if (props.enabled) { classes.push("enabled"); } return ( <span className={classes.join(" ")}> <label className="check-box"> <input type="checkbox" name={"tag-" + props.tag} value="1" checked={props.enabled} onChange={handleChange} /> <span className="name">{props.tag}</span> </label> </span> ); }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pages_core-3.12.4 | app/javascript/components/TagEditor/Tag.tsx |
pages_core-3.12.3 | app/javascript/components/TagEditor/Tag.tsx |
pages_core-3.12.2 | app/javascript/components/TagEditor/Tag.tsx |