This project is a React component that provides a customizable tooltip for displaying additional information on hover.
The following props can be passed into the Tooltip component:
text
(string, required): The text to display in the tooltiptextsize
(string): The font size of the text in the tooltipchildren
(node, required): The child element that the tooltip will be attached tobgcolor
(string): The background color of the tooltiptextcolor
(string): The color of the text in the tooltippadding
(string): The padding around the tooltip contentcornerradius
(string): The corner radius of the tooltiptooltipwidth
(string): The width of the tooltiparrowheight
(string): The height of the arrow on the tooltiphorizontalposition
(string): The horizontal position of the tooltip relative to the child element (options: "start", "center", "end")verticalposition
(string): The vertical position of the tooltip relative to the child element (options: "top", "bottom")alwaysvisible
(bool): Whether the tooltip should always be visibleimageFile
(object): An image to display in the tooltipimageposition
(string): The position of the image relative to the text (options: "Left", "Right", "Top", "Bottom")
The default prop values stored in context are used as the initial values for the props when the component is first rendered. These values can be overridden by passing in new props when the component is used.