반응형
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>
}
반응형
'Frontend > HTML, CSS, DOM, jQuery' 카테고리의 다른 글
TailWindCSS) Set-up for react-native (0) | 2022.12.13 |
---|---|
웹 개발 프론트 표준 사이즈 (0) | 2022.11.08 |
TailwindCSS) input focus 테두리 없애기 (0) | 2022.10.23 |
TailWindCSS) Set-up (0) | 2022.07.25 |
4. TypeScript(타입스크립트) Interface (0) | 2022.06.18 |