MCPcopy Index your code
hub / github.com/danvk/webdiff / toggleField

Function toggleField

ts/DiffOptions.tsx:63–65  ·  view source on GitHub ↗
(k: BooleanOptions)

Source from the content-addressed store, hash-verified

61 setIsVisible(!isVisible);
62 };
63 const toggleField = (k: BooleanOptions) => () => {
64 updateOptions(options => ({[k]: !options[k]}));
65 };
66 const setUnifiedContext: React.ChangeEventHandler<HTMLInputElement> = e => {
67 updateOptions({unified: e.currentTarget.valueAsNumber});
68 };

Callers 1

DiffOptionsControlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected