Files
twenty/packages/twenty-docs/l/pt/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.7 KiB
Plaintext

---
title: Seletor de ícone
image: /images/user-guide/github/github-header.png
---
<Frame>
<img src="/images/user-guide/github/github-header.png" alt="Header" />
</Frame>
Um seletor de ícones baseado em dropdown que permite aos usuários selecionar um ícone de uma 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 | Descrição |
| --------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| desativado | booleano | Desativa o seletor de ícones se definido como `true` |
| onChange | função | The callback function triggered when the user selects an icon. Ela recebe um objeto com as propriedades `iconKey` e `Icon` |
| selectedIconKey | Nome opcional para estilização adicional | A chave do ícone inicialmente selecionado |
| onClickOutside | funções | Callback function triggered when the user clicks outside the dropdown |
| onClose | função | Callback function triggered when the dropdown is closed |
| onOpen | funções | Callback function triggered when the dropdown is opened |
| variante | Nome opcional para estilização adicional | A variante de estilo visual do ícone clicável. As opções incluem: `primary`, `secondary` e `tertiary` |
</Tab>
</Tabs>