Files
twenty/packages/twenty-docs/l/cs/twenty-ui/input/icon-picker.mdx
T
Félix Malfait 3dd858c91e i18n - docs translations (#16774)
Created by Github action

Pulls the latest documentation translations from Crowdin for all
supported languages:
- French (fr)
- Arabic (ar)  
- Czech (cs)
- German (de)
- Spanish (es)
- Italian (it)
- Japanese (ja)
- Korean (ko)
- Portuguese (pt)
- Romanian (ro)
- Russian (ru)
- Turkish (tr)
- Chinese (zh-CN)

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-12-23 14:26:11 +01:00

53 lines
2.4 KiB
Plaintext

---
title: Výběr Ikony
image: /images/user-guide/github/github-header.png
---
<Frame>
<img src="/images/user-guide/github/github-header.png" alt="Hlavička" />
</Frame>
Rozbalovací výběr ikon, který uživatelům umožňuje vybrat ikonu ze seznamu.
<Tabs>
<Tab title="Použití">
```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="Vlastnosti">
| Vlastnosti | Typ | Popis |
| --------------- | ------------------ | ------------------------------------------------------------------------------------------------------------- |
| neaktivní | booleovská hodnota | Deaktivuje výběr ikon, pokud je nastavena hodnota `true` |
| onChange | funkce | Vyvolá se funkce zpětného volání, když uživatel vybere ikonu. Přijímá objekt s vlastnostmi `iconKey` a `Icon` |
| selectedIconKey | textový řetězec | The key of the initially selected icon |
| onClickOutside | funkce | Funkce zpětného volání, vyvolaná, když uživatel klikne mimo rozbalovací nabídku. |
| onClose | funkce | Callback function triggered when the dropdown is closed |
| onOpen | funkce | Funkce zpětného volání, vyvolaná, když je rozbalovací nabídka otevřena. |
| varianta | řetězec | The visual style variant of the clickable icon. Možnosti zahrnují: "primární", "sekundární" a "terciární" |
</Tab>
</Tabs>