Sha256: 150b26a762c3376b351b97e705268f6cbd9d6a1d3adccc65117fbb1aea8662c1
Contents?: true
Size: 734 Bytes
Versions: 4
Compression:
Stored size: 734 Bytes
Contents
import React from "react"; import { allTags, isEnabled } from "./useTags"; import AddTagForm from "./AddTagForm"; import Tag from "./Tag"; import * as Tags from "../../types/Tags"; interface Props { name: string; state: Tags.State; dispatch: (action: Tags.Action) => void; } export default function Editor(props: Props) { const { name, state, dispatch } = props; return ( <div className="tag-editor"> <input type="hidden" name={name} value={JSON.stringify(state.enabled)} /> {allTags(state).map((t) => ( <Tag key={t} tag={t} enabled={isEnabled(t, state)} dispatch={dispatch} /> ))} <AddTagForm dispatch={dispatch} /> </div> ); }
Version data entries
4 entries across 4 versions & 1 rubygems