Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Create Tooltip component (#871)
* create tooltip using css usilities * additional styles * add useState hooks to tooltip component * add correct styles according to position * additional edits to positioning tooltip body, add element ID to locate tooltipbody in DOM * move all positioning login into a useEffect, register TooltipBodyWidth within useEffent * add tooltip ID and remove comments * remove styles file * add tests to tooltip component * export tooltip component in index.ts * replace reference to tooltipBodyRef.current with variable tooltipBodyWidth * remove package lock file * create a default tooltip trigger button and create tests for tooltip body visibility * begin writing up custom component based off of Link component example * put custom component render in a conditional statement * utilize forward ref in customComponent * abstract useEffect into a fn, useTooltip * move html element role, move event listeners to custom component props * move isElementInViewport to a utils file * correct tests and add test id to tooltip trigger element * add display name * add story displayname * corect var name CustomLinkProps * update tests * add data classes prop for css utility classes * add keyboard events to tests * change dataclasses to wrapperclasses and move to trigger element, move tooltipElementID to tooltip component level * remove className for wrapperclasses from tooltipComponent * apply classname to tooltipTrigger element * reformat for storybook addon Co-authored-by: Andrew Hobson <21983+ahobson@users.noreply.github.com>
- Loading branch information