芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/reginaeigbe.com/folder/admin/tmp/resources/js/Admin/Components/Inputs/TextInput.jsx
import { useRef, useState } from "react"; export default function TextInput({ marginBottom = "20px", ...props }) { const [isFocused, setIsFocused] = useState(false); const inputRef = useRef(); const handleFocus = () => { setIsFocused(true); }; const handleBlur = () => { setIsFocused(false); }; const inputClassName = isFocused || inputRef.current?.value || props.value ? "active1" : ""; return (
{props.title}
{props.error && (
{props.error}
)}
); }