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

Function styleFieldToCssObject

packages/shared/src/component-utils.ts:182–194  ·  view source on GitHub ↗
(
  styleField: StyleField<T> | undefined,
  args: T,
)

Source from the content-addressed store, hash-verified

180};
181
182export const styleFieldToCssObject = <T extends MinCallbackArg>(
183 styleField: StyleField<T> | undefined,
184 args: T,
185) => {
186 if (typeof styleField === "object") return styleField;
187 if (typeof styleField === "function") {
188 const result = styleField(args);
189
190 if (typeof result === "object") return result;
191 }
192
193 return {};
194};
195
196export const contentFieldToContent = <T extends MinCallbackArg>(
197 contentField: ContentField<T> | undefined,

Callers 11

UploadDropzoneFunction · 0.90
renderClearButtonFunction · 0.90
renderAllowedContentFunction · 0.90
UploadButtonFunction · 0.90
UploadDropzoneFunction · 0.90
UploadButtonFunction · 0.90
renderUploadIconFunction · 0.90
generateUploadDropzoneFunction · 0.90
renderClearButtonFunction · 0.90
renderAllowedContentFunction · 0.90
generateUploadButtonFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected