[UI]: Migrate react-tooltip usages to CustomTooltip from @sistent/sistent
kind/bughelp wantedframework/gatsby
### Description
Several files in the codebase currently use `react-tooltip` for tooltip functionality, while the project has standardized on `CustomTooltip` from `@sistent/sistent` as the preferred tooltip component.
This inconsistency means different parts of the website render tooltips with different styles, behaviors, and dependencies.
### Expected Behavior
All tooltip usage across the codebase should use `CustomTooltip` from `@sistent/sistent`, consistent with the design system and existing usage in the codebase.
Rather than doing a direct find-and-replace of `react-tooltip` with `CustomTooltip` across every file, the cleaner long-term solution is to introduce a shared internal Tooltip wrapper component inside :
**`src/components/Tooltip/index.js`**
All files across the repo would then import from this single wrapper:
```js
import Tooltip from "../../components/Tooltip";
```
**Why this approach:**
- Single source of truth — if `@sistent/sistent` ever updates `CustomTooltip`, only one file needs to change
- Makes future migrations easier
### Screenshots
NA
### Environment:
- Host OS:
- Browser:
---
<img src="https://raw.githubusercontent.com/layer5io/layer5/master/.github/assets/images/layer5/5-light-small.svg" width="24px" align="left" /><h2>Contributor Resources and <a href="https://layer5.io/community/handbook">Handbook</a></h2>
The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the [`master` branch](https://github.com/layer5io/layer5/tree/master).
- 📚 See [contributing instructions](https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md).
- 🎨 Wireframes and [designs for Layer5 site](https://www.figma.com/file/5ZwEkSJwUPitURD59YHMEN/Layer5-Designs) in Figma [(open invite)](https://www.figma.com/team_invite/redeem/GvB8SudhEOoq3JOvoLaoMs)
- 🙋🏾🙋🏼 Questions: [Discussion Forum](https://discuss.layer5.io) and [Community Slack](https://slack.layer5.io).
<img src="https://raw.githubusercontent.com/layer5io/layer5/master/.github/assets/images/buttons/community.webp" height="22px" align="left" />Join the Layer5 Community by submitting your [community member form](https://layer5.io/newcomer).
6 条评论