MCPcopy
hub / github.com/027xiguapi/code-box / ShowTag

Function ShowTag

component/items/showTag.tsx:7–31  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

5import { i18n } from "~tools"
6
7export default function ShowTag(props) {
8 let { name } = props
9
10 const [showTag, setShowTag] = useStorage(`${name}-showTag`, (v) =>
11 v === undefined ? true : v
12 )
13
14 return (
15 <div className="item">
16 <span>
17 <StarTwoTone twoToneColor="#eb2f96" style={{ marginRight: "5px" }} />
18 {i18n("showTag")}
19 </span>
20 <input
21 type="checkbox"
22 id={`${name}-showTag`}
23 name={`${name}-showTag`}
24 className="codebox-offscreen"
25 checked={showTag}
26 onChange={(e) => setShowTag(e.target.checked)}
27 />
28 <label className="codebox-switch" htmlFor={`${name}-showTag`}></label>
29 </div>
30 )
31}

Callers

nothing calls this directly

Calls 1

i18nFunction · 0.85

Tested by

no test coverage detected