-
Notifications
You must be signed in to change notification settings - Fork 52
feat(tooltip): add container prop #1254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tooltip): add container prop #1254
Conversation
🦋 Changeset detectedLatest commit: 54bfa00 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Chromatic Report🚀 Congratulations! Your build was successful! |
463c68c to
54bfa00
Compare
| const [showTarget, setShowTarget] = useState(true) | ||
|
|
||
| const handleClick = useCallback(() => { | ||
| setShowTarget(false) | ||
| }, []) | ||
| const [container, setContainer] = useState<HTMLDivElement | null>(null) | ||
|
|
||
| return ( | ||
| <Tooltip {...props}> | ||
| { showTarget && ( | ||
| <Target onClick={handleClick}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
적절하지 않은 스토리라고 판단하여 간단명료한 스토리로 변경
Self Checklist
CODEOWNERSfile.Related Issue
None
Summary
Tooltip에container속성을 추가합니다.Details
Overlay와 동일하게, 별도의container속성을 지정하면 해당 노드 아래에 렌더되도록 할 수 있습니다.Breaking change or not (Yes/No)
No. container를 지정하지 않을 경우 기본값은
getRootElement()의 반환값으로 동일합니다.References
None