4c4eeef5ae
Created by Github action Co-authored-by: github-actions <github-actions@twenty.com>
89 lines
4.9 KiB
Plaintext
89 lines
4.9 KiB
Plaintext
---
|
|
title: Info-bulle de l'application
|
|
image: /images/user-guide/tips/light-bulb.png
|
|
---
|
|
|
|
<Frame>
|
|
<img src="/images/user-guide/tips/light-bulb.png" alt="Header" />
|
|
</Frame>
|
|
|
|
Un message bref qui affiche des informations supplémentaires lorsqu'un utilisateur interagit avec un élément.
|
|
|
|
<Tabs>
|
|
<Tab title="Usage">
|
|
|
|
```jsx
|
|
import { AppTooltip } from "@/ui/display/tooltip/AppTooltip";
|
|
|
|
export const MyComponent = () => {
|
|
return (
|
|
<>
|
|
<p id="hoverText" style={{ display: "inline-block" }}>
|
|
Customer Insights
|
|
</p>
|
|
<AppTooltip
|
|
className
|
|
anchorSelect="#hoverText"
|
|
content="Explore customer behavior and preferences"
|
|
delayHide={0}
|
|
offset={6}
|
|
noArrow={false}
|
|
isOpen={true}
|
|
place="bottom"
|
|
positionStrategy="absolute"
|
|
/>
|
|
</>
|
|
);
|
|
};
|
|
```
|
|
|
|
</Tab>
|
|
|
|
<Tab title="Props">
|
|
|
|
| Propriétés | Type | Description |
|
|
| ----------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
| nomDeClasse | chaîne | Classe CSS facultative pour le style supplémentaire |
|
|
| sélecteurAncre | Sélecteur CSS | Sélecteur pour l'ancre de l'info-bulle (l'élément qui déclenche l'info-bulle) |
|
|
| contenu | chaîne | Le contenu que vous souhaitez afficher dans l'info-bulle |
|
|
| délaiMasquer | nombre | Le délai avant de masquer l'info-bulle après que le curseur ait quitté l'ancre |
|
|
| décalage | nombre | Le décalage en pixels pour positionner l'info-bulle |
|
|
| pasDeFlèche | booléen | Si `vrai`, masque la flèche sur l'info-bulle |
|
|
| estOuvert | booléen | Si `vrai`, l'info-bulle est ouverte par défaut |
|
|
| emplacement | Chaîne `PlacesType` de `react-tooltip` | Spécifie le placement de l'info-bulle. Les valeurs incluent `bottom`, `left`, `right`, `top`, `top-start`, `top-end`, `right-start`, `right-end`, `bottom-start`, `bottom-end`, `left-start`, et `left-end` |
|
|
| stratégiePositionnement | Chaîne `PositionStrategy` de `react-tooltip` | Stratégie de positionnement pour l'info-bulle. A deux valeurs : `absolute` et `fixed` |
|
|
|
|
</Tab>
|
|
|
|
</Tabs>
|
|
|
|
## Texte débordant avec info-bulle
|
|
|
|
Gère le texte débordant et affiche une info-bulle lorsque le texte déborde.
|
|
|
|
<Tabs>
|
|
<Tab title="Usage">
|
|
|
|
```jsx
|
|
import { OverflowingTextWithTooltip } from 'twenty-ui/display';
|
|
|
|
export const MyComponent = () => {
|
|
const crmTaskDescription =
|
|
'Follow up with client regarding their recent product inquiry. Discuss pricing options, address any concerns, and provide additional product information. Record the details of the conversation in the CRM for future reference.';
|
|
|
|
return <OverflowingTextWithTooltip text={crmTaskDescription} />;
|
|
};
|
|
```
|
|
|
|
</Tab>
|
|
|
|
<Tab title="Props">
|
|
|
|
| Propriétés | Type | Description |
|
|
| ---------- | ------ | ----------------------------------------------------------------------- |
|
|
| texte | chaîne | Le contenu que vous souhaitez afficher dans la zone de texte débordante |
|
|
|
|
</Tab>
|
|
|
|
</Tabs>
|