Closed jsc7727 closed 1 year ago
onBlur onFocus bubbling refactor
const [isFocus, setIsFocus] = useState(false); const handleInputFocusCss = () => { return isFocus ? "bg-white outline outline-2 outline-terriary-mint dark:bg-[#f0f2f5]" : ""; }; <div className={`... ${handleInputFocusCss()}`} onFocus={() => { setIsFocus(true); }} onBlur={() => { setIsFocus(false); }} > </div>
onBlur onFocus bubbling refactor