React-tooltip: Color on the top tooltip arrow

Created on 7 Sep 2017  路  5Comments  路  Source: wwayne/react-tooltip

Hi!

I'm trying to customize my border color for my tooltip. It works for the primary border shape, but leaves the arrow a black color. Is there a way to also customize that color so the whole thing is consistent?

How it currently looks:
screen shot 2017-09-07 at 11 43 36 am

My current code:

css

  .tooltip-custom {
    font-weight: bold;
    border-radius: 2rem;
    border: 1px solid $color !important;
    color: $color !important;
  }
<ReactTooltip id='icon' place='bottom' class='tooltip-custom' type='light' border='true'/>

Thank you!

Most helpful comment

If you don't want to use a custom class:

.__react_component_tooltip.place-left::after {
    border-left: 8px solid red !important;
}

.__react_component_tooltip.place-right::after {
    border-right: 8px solid red !important;
}

.__react_component_tooltip.place-top::after {
    border-top: 8px solid red !important;
}

.__react_component_tooltip.place-bottom::after {
    border-bottom: 8px solid red !important;
}

All 5 comments

Hi @amymarco
Did you find your way around this issue?
I'm facing the very same problem and can't figure out how to change the black color of the arrow.
Thanks

@ali-sadeghin
this seemed to do the trick:

.__react_component_tooltip.type-light.border.place-bottom:before{
            border-bottom:8px solid $color;
    }

    .tooltip-custom {
      font-weight: bold;
      border-radius: 2rem;
      border: 1px solid $color !important;
      color: $color !important;

Thanks a bunch @amymarco , you saved my life ;-)

If you don't want to use a custom class:

.__react_component_tooltip.place-left::after {
    border-left: 8px solid red !important;
}

.__react_component_tooltip.place-right::after {
    border-right: 8px solid red !important;
}

.__react_component_tooltip.place-top::after {
    border-top: 8px solid red !important;
}

.__react_component_tooltip.place-bottom::after {
    border-bottom: 8px solid red !important;
}

You saved me Man, Thank You...!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ericky14 picture Ericky14  路  3Comments

lovetann picture lovetann  路  3Comments

tanykim picture tanykim  路  4Comments

kristinadarroch picture kristinadarroch  路  3Comments

tonynd picture tonynd  路  3Comments