Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
3 replies
mimi

uploadthing custom theming not working

hey guys I am not sure if I am doing this correctly but custom theming is not working on the UploadButton

The container does change color but the button doesn't change at all

**My css is in globals.css

      <UploadButton
        appearance={{
          button({ ready, isUploading }) {
            return `custom-button ${
              ready ? "custom-button-ready" : "custom-button-not-ready"
            } ${isUploading ? "custom-button-uploading" : ""}`;
          },
          container: "custom-container",
          allowedContent: "custom-allowed-content",
        }}        endpoint="imageUploader"
        onClientUploadComplete={(res) => {
          console.log("Files: ", res);
          alert("Upload Completed");
        }}
        onUploadError={(error: Error) => {
          // Do something with the error.
          alert(`ERROR! ${error.message}`);
        }}
      />
Was this page helpful?