Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Rendering an arrow and stying, with referenceElement #213

@doneumark

Description

@doneumark

Steps to reproduce the problem

  1. I'm trying to reproduce a tooltip-like behavior, with a referenceElement. My code is the following:
<Popper
    referenceElement={element}
    placement='right'
>
    {({ ref, style, placement, arrowProps }) => (
        <div ref={ref} style={style} data-placement={placement}>
            Popper element
            <div ref={arrowProps.ref} style={arrowProps.style} />
        </div>
    )}
</Popper>
  1. In the page, the "tooltip" is on the right from the DOM element, but with no arrow.
  2. If I would like the arrow to be shown and be pointed to the element at all placement he get, and also style the "tooltip" itself, how can I do that?

What is the expected behavior?
Tooltip should show an arrow beside him.

What went wrong?
He doesn't.

Packages versions
react-popper: 1.0.2

Code
https://codesandbox.io/s/r0lrlk54qp

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions