2353bc62cc
Created by Github action Co-authored-by: github-actions <github-actions@twenty.com>
79 lines
5.3 KiB
Plaintext
79 lines
5.3 KiB
Plaintext
---
|
|
title: Consejo de la aplicación
|
|
image: /images/user-guide/tips/light-bulb.png
|
|
---
|
|
|
|
<Frame>
|
|
<img src="/images/user-guide/tips/light-bulb.png" alt="Encabezado" />
|
|
</Frame>
|
|
|
|
Un breve mensaje que muestra información adicional cuando un usuario interactúa con un elemento.
|
|
|
|
<Tabs>
|
|
<Tab title="Uso">
|
|
```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">
|
|
| Props | Tipo | Descripción |
|
|
| ------------------ | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| nombreDeClase | cadena | Clase CSS opcional para estilo adicional |
|
|
| anchorSelect | Selector CSS | Selector para el ancla del consejo (el elemento que activa el consejo) |
|
|
| contenido | cadena | El contenido que desea mostrar dentro del consejo |
|
|
| delayHide | número | The delay in seconds before hiding the tooltip after the cursor leaves the anchor |
|
|
| desplazamiento | número | El desplazamiento en píxeles para posicionar el consejo |
|
|
| sinFlecha | booleano | Si es `true`, oculta la flecha en el consejo |
|
|
| estáAbierto | booleano | Si es `true`, el consejo está abierto por defecto |
|
|
| lugar | Cadena `PlacesType` de `react-tooltip` | Especifica la colocación del consejo. Los valores incluyen `inferior`, `izquierda`, `derecha`, `superior`, `superior-inicio`, `superior-fin`, `derecha-inicio`, `derecha-fin`, `inferior-inicio`, `inferior-fin`, `izquierda-inicio` y `izquierda-fin` |
|
|
| estrategiaPosicion | Cadena `PositionStrategy` de `react-tooltip` | Estrategia de posición para el consejo. Tiene dos valores: `absoluto` y `fijo` |
|
|
</Tab>
|
|
</Tabs>
|
|
|
|
## Texto Desbordante con Consejo
|
|
|
|
Maneja texto desbordante y muestra un consejo cuando el texto se desborda.
|
|
|
|
<Tabs>
|
|
<Tab title="Uso">
|
|
```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">
|
|
| Props | Tipo | Descripción |
|
|
| ----- | ------ | -------------------------------------------------------------- |
|
|
| texto | cadena | El contenido que desea mostrar en el área de texto desbordante |
|
|
</Tab>
|
|
</Tabs>
|