Files
twenty/packages/twenty-docs/l/es/twenty-ui/input/icon-picker.mdx
T
github-actions[bot] 8cadd00d34 i18n - translations (#15799)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-11-13 16:34:00 +01:00

57 lines
2.5 KiB
Plaintext

---
title: Selector de Íconos
image: /images/user-guide/github/github-header.png
---
<Frame>
<img src="/images/user-guide/github/github-header.png" alt="Header" />
</Frame>
Un selector de íconos basado en un menú desplegable que permite a los usuarios seleccionar un ícono de una lista.
<Tabs>
<Tab title="Usage">
```jsx
import { RecoilRoot } from "recoil";
import React, { useState } from "react";
import { IconPicker } from "@/ui/input/components/IconPicker";
export const MyComponent = () => {
const [selectedIcon, setSelectedIcon] = useState("");
const handleIconChange = ({ iconKey, Icon }) => {
console.log("Selected Icon:", iconKey);
setSelectedIcon(iconKey);
};
return (
<RecoilRoot>
<IconPicker
disabled={false}
onChange={handleIconChange}
selectedIconKey={selectedIcon}
variant="primary"
/>
</RecoilRoot>
);
};
```
</Tab>
<Tab title="Props">
| "Props" | Tipo | Descripción |
| --------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| "desactivado" | booleano | Desactiva el selector de íconos si está configurado en `true` |
| "onChange" | "función" | The callback function triggered when the user selects an icon. Recibe un objeto con las propiedades `iconKey` y `Icon` |
| selectedIconKey | "cadena" | La clave del ícono seleccionado inicialmente |
| onClickOutside | "función" | Callback function triggered when the user clicks outside the dropdown |
| onClose | "función" | Callback function triggered when the dropdown is closed |
| onOpen | función | Callback function triggered when the dropdown is opened |
| variante | "cadena" | La variante de estilo visual del ícono clicable. Las opciones incluyen: `primario`, `secundario` y `terciario` |
</Tab>
</Tabs>