This project was bootstrapped with Create React App.
This is a custom tooltip component built using React's createPortal
hook. This hook allows us to create a "sister" DOM node at the level of the "root" node but in the React DOM hierarchy, the two nodes are not entirely independent - the "sister" node made with createPortal
(called "portal-root" in this project) continues to listen for actions on the "root" node. This makes components such as portals or tooltips like this one much easier to establish and manage.
You can also download a movie version here: Tooltip Movie
In the project directory, you can run:
This component uses Sass for styling. Use npm install
before running or add node-sass after cloning: npm i node-sass
.
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Runs the app in storybook mode.
Open http://localhost:9009/ to view in your browser.