Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

added select component

kachbit40c00fc12b84
diff --git a/frontend/src/components/ui/select.tsx b/frontend/src/components/ui/select.tsx
new file mode 100644
index 00000000..6d4d9433
--- /dev/null
+++ b/frontend/src/components/ui/select.tsx
@@ -0,0 +1,24 @@
+import * as React from "react";
+import { cn } from "@/lib/utils";
+
+export interface SelectProps
+ extends React.SelectHTMLAttributes<HTMLSelectElement> {}
+
+const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
+ ({ className, ...props }, ref) => {
+ return (
+ <select
+ className={cn(
+ "block appearance-none w-full text-sm shadow-sm rounded-md border border-input bg-white py-2 px-3 focus:outline-none focus:border-black",
+ className
+ )}
+ ref={ref}
+ {...props}
+ />
+ );
+ }
+);
+
+Select.displayName = "Select";
+
+export { Select };