Feat: "...props" added to Input.Text
This commit is contained in:
1 parent
1892314610
commit
09c5df8aae
2 files changed
+12
-6
No files matched your search
@@ -3,13 +3,14 @@ import { ComponentPropsWithoutRef } from "react";
|
||||
|
||||
interface TextfieldProps extends ComponentPropsWithoutRef<"input"> {}
|
||||
|
||||
function Textfield({value, onChange, placeholder}: TextfieldProps) {
|
||||
function Textfield({value, onChange, placeholder, ...props}: TextfieldProps) {
|
||||
return (
|
||||
<input
|
||||
className="w-full border border-neutral-700 rounded-lg px-4 py-2.5 placeholder-neutral-500 focus:outline-none focus:border-blue-400 text-sm"
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
placeholder={placeholder}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user