Skip to content

Commit

Permalink
[#6] 설명 더 보기 버튼
Browse files Browse the repository at this point in the history
  • Loading branch information
03hoho03 committed Apr 6, 2024
1 parent fb88de7 commit 3389826
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.question_icon_container {
display: flex;
position:relative;
justify-content: center;
align-items: center;
}
.question_icon {
color:var(--purple-700);
cursor: pointer;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
'use client'

import React, { useState } from 'react'
import S from './index.module.css'
import { BsFillQuestionCircleFill } from 'react-icons/bs'
import MoreExplainToggle from '../MoreExplainToggle'

function MoreExplainBtn({ type }: { type: string }) {
const [isHover, setIsHover] = useState(false)

const handleMouseOver = () => {
setIsHover(true)
}
const handleMouseOut = () => {
setIsHover(false)
}

return (
<div className={S.question_icon_container}>
<BsFillQuestionCircleFill
className={S.question_icon}
onMouseOver={handleMouseOver}
onMouseOut={handleMouseOut}
/>
{isHover && <MoreExplainToggle type={type} />}
</div>
)
}

export default MoreExplainBtn

0 comments on commit 3389826

Please sign in to comment.