2

I am using ReactTooltip

Example

Component

<ReactTooltip className={styles.customTheme} id={id} place={placement} effect="solid"> 
    {children}
</ReactTooltip>

SCSS

.customTheme {
  color: #ff6e00 !important;
  background-color: orange !important;

  &.place-top {
    &::after {
      border-top: 6px solid orange !important;
    }
  }
}

Result

enter image description here

Issue

The arrow color is not changed as expected.

Community
  • 1
  • 1
Kuldeep Bhimte
  • 961
  • 1
  • 10
  • 25

2 Answers2

0

you can also use "title" in html tag like Name:"<input type="text" title="enter name" />

0

You're close. Your SCSS just needs the ::before pseudo-selector.

.customTheme {
  background-color: #ff6e00 !important;
  border: 1px solid;
  &.place-top {
    &::before, &::after {
      border-top: 8px solid #ff6e00!important;
    }
  }

Note that you should just be able to use the backgroundColor and/or arrowColor prop on the component, but they're not working: https://github.com/wwayne/react-tooltip/issues/594

kburgie
  • 695
  • 6
  • 14