# Tooltip

## children deep dive

The children prop on tooltip is a `function` that takes in a set of `RenderArguments` and returns a JSX element that has been passed those props. The JSX element that receives these props is the element that the tooltip is attached to.

In most cases, these arguments would just be passed directly on to the JSX element that is returned from the prop.

```
(tooltipProps) => <p {...tooltipProps} tabIndex={0}>I don't have enough information</p>

```

### RenderArguments

- Type:

```
{
onMouseLeave: (any) => void
onMouseEnter: (any) => void
onBlur: (any) => void
onFocus: (any) => void
onClick: (any) => void
ref: Ref<any>
}
```

- Required: ✅

| Argument     | Description                                                                                                       |
| ------------ | ----------------------------------------------------------------------------------------------------------------- |
| onMouseLeave | A callback that is fired when the mouse leaves the wrapped tooltip area. Will result in the tooltip disappearing. |
| onMouseEnter | A callback that is fired when the mouse enters the wrapped tooltip area. Will result in the tooltip appearing.    |
| onBlur       | A callback that is fired when the focus leaves the wrapped tooltip area. Will result in the tooltip disappearing. |
| onFocus      | A callback that is fired when the focus enters the wrapped tooltip area. Will result in the tooltip appearing.    |
| onClick      | A callback that is fired when the tooltip area is clicked. Will result in the tooltip disappearing.               |
| ref          | A [Ref](https://reactjs.org/docs/refs-and-the-dom.html) that should be applied to the tooltip area.               |
