我正在使用ReactTooltip
<ReactTooltip className={styles.customTheme} id={id} place={placement} effect="solid">
{children}
</ReactTooltip>
.customTheme {
color: #ff6e00 !important;
background-color: orange !important;
&.place-top {
&::after {
border-top: 6px solid orange !important;
}
}
}
箭头颜色未按预期更改。
答案 0 :(得分:0)
您还可以在html标签中使用“ title”,例如
名称:“ <input type="text" title="enter name" />
答案 1 :(得分:0)
你很接近。您的 SCSS 只需要 ::before
伪选择器。
.customTheme {
background-color: #ff6e00 !important;
border: 1px solid;
&.place-top {
&::before, &::after {
border-top: 8px solid #ff6e00!important;
}
}
请注意,您应该只能在组件上使用 backgroundColor
和/或 arrowColor
道具,但它们不起作用:https://github.com/wwayne/react-tooltip/issues/594