반응형
const [open, setOpen ]  =useState(true)

 const openHanddler = () =>{
    setOpen(!open)
  }
  
    <svg  onClick={()=> openHanddler()} className="w-6 h-6 text-color-orange" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>
              { open ||
              <div className=' p-5 absolute overflow-scroll top-12 right-[-1.5rem]  rounded-2xl   w-44 h-48 border border-gray-100 shadow-[0_0px_13px_4px_rgba(224,224,224,1)] focus:shoadow-none'>
                <ul >
                  {
                   바부
                    )
                  }

                </ul>
              </div>
              }
반응형
복사했습니다!