MCPcopy
hub / github.com/pingdotgg/uploadthing / state

Function state

packages/solid/src/components/button.tsx:120–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118 const fileInfo = () => generatePermittedFileTypes(uploadThing.routeConfig());
119
120 const state = () => {
121 const ready = fileInfo().fileTypes.length > 0;
122
123 if ($props.disabled) return "disabled";
124 if (!ready) return "readying";
125 if (!uploadThing.isUploading()) return "ready";
126 return "uploading";
127 };
128
129 const uploadFiles = (files: File[]) => {
130 const input = "input" in $props ? $props.input : undefined;

Callers 3

onUploadClickFunction · 0.70
UploadButtonFunction · 0.70
getButtonContentFunction · 0.70

Calls 1

fileInfoFunction · 0.70

Tested by

no test coverage detected