3

Can anyone please explain to me how can we make bold text to unbold in react-tooltip. I have used npm react-tooltip

note: default text is bold I want normal text.

Fred
  • 3,365
  • 4
  • 36
  • 57
Anuj Shakya
  • 73
  • 1
  • 9

2 Answers2

2

You can apply the font-weight: normal as mentioned using the data attribute used by react-tooltip.

a[data-tip] {
  font-weight: normal;
}
JackZ
  • 127
  • 1
  • 13
-1

You can customize the text style via the API of ReactTooltip

<ReactTooltip textColor={"lightblue"} backgroundColor={"white"} />

Or simply use !important

.Tooltip {
  color: red !important;
}
<ReactTooltip className="Tooltip" />

Which is been suggested in its document demo:

.extraClass {
  font-size: 20px !important;
  pointer-events: auto !important;
}
.extraClass:hover {
  visibility: visible !important;
  opacity: 1 !important;
}

Edit react-tooltip-example-3.11.6

keikai
  • 14,085
  • 9
  • 49
  • 68