Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finally implement image and urdf uploading #239

Merged
merged 4 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
180 changes: 0 additions & 180 deletions frontend/src/components/listing/EditListingModal.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { buttonVariants } from "components/ui/Button/Button";
import { Input } from "components/ui/Input/Input";
import { Trash2 as RemoveIcon } from "lucide-react";
import {
createContext,
Expand All @@ -17,8 +19,6 @@ import {
useDropzone,
} from "react-dropzone";
import { cn } from "utils";
import { buttonVariants } from "./Button/Button";
import { Input } from "./Input/Input";

type DirectionOptions = "rtl" | "ltr" | undefined;

Expand Down Expand Up @@ -351,3 +351,27 @@ export const FileInput = forwardRef<
});

FileInput.displayName = "FileInput";

export const FileSubmitButton = forwardRef<
HTMLButtonElement,
React.ButtonHTMLAttributes<HTMLButtonElement>
>(({ children, className, ...props }, ref) => {
const { isLOF } = useFileUpload();
return (
<button
ref={ref}
type="button"
disabled={!isLOF}
className={cn(
buttonVariants({ variant: "primary" }),
"w-full",
className,
)}
{...props}
>
{children}
</button>
);
});

FileSubmitButton.displayName = "FileSubmitButton";
Loading
Loading