React 工具提示中是否有更改文本样式(即粗体到非粗体)的道具?

Is there any props to change text style(i.e. bold to unbold) in React tooltip?

任何人都可以向我解释一下我们如何在 react-tooltip 中将粗体文本变为非粗体。我用过 npm react-tooltip

注意:默认文本是粗体我想要普通文本。

您可以使用 react-tooltip 使用的数据属性来应用 font-weight: normal

a[data-tip] {
  font-weight: normal;
}

您可以通过API of ReactTooltip

自定义文字样式
<ReactTooltip textColor={"lightblue"} backgroundColor={"white"} />

或者直接使用!important

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

在其文档演示中建议:

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