001c2097a3
Created by Github action <!-- mintlify-editor-comments:start --> Mintlify --- 0 threads from 0 users in Mintlify - No unresolved comments <!-- mintlify-editor-comments:end --> <!-- mintlify-comment--> <a href="https://dashboard.mintlify.com/twenty/twenty/editor/i18n-docs?source=pr_comment" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://d3gk2c5xim1je2.cloudfront.net/assets/open-mintlify-editor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://d3gk2c5xim1je2.cloudfront.net/assets/open-mintlify-editor-light.svg"><img src="https://d3gk2c5xim1je2.cloudfront.net/assets/open-mintlify-editor-light.svg" alt="Open in Mintlify Editor"></picture></a> <!-- /mintlify-comment --> Co-authored-by: github-actions <github-actions@twenty.com>
62 lines
2.5 KiB
Plaintext
62 lines
2.5 KiB
Plaintext
---
|
|
title: Symbolauswahl
|
|
image: /images/user-guide/github/github-header.png
|
|
---
|
|
|
|
<Frame>
|
|
<img src="/images/user-guide/github/github-header.png" alt="Kopfzeile" />
|
|
</Frame>
|
|
|
|
Eine Dropdown-basierte Symbolauswahl, mit der Benutzer ein Symbol aus einer Liste auswählen können.
|
|
|
|
<Tabs>
|
|
|
|
<Tab title=""Verwendung"">
|
|
|
|
```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=""Eigenschaften"">
|
|
|
|
|
|
| "Eigenschaften" | Typ | Beschreibung |
|
|
| --------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
| deaktiviert | boolesch | Deaktiviert die Symbolauswahl, wenn auf `true` gesetzt ist. |
|
|
| beiÄnderung | function | Die Rückruffunktion wird ausgelöst, wenn der Benutzer ein Symbol auswählt. Es erhält ein Objekt mit `iconKey` und `Icon` Eigenschaften |
|
|
| selectedIconKey | string | Der Schlüssel des ursprünglich ausgewählten Symbols |
|
|
| onClickOutside | Funktion | Rückruffunktion wird ausgelöst, wenn der Benutzer außerhalb des Dropdowns klickt |
|
|
| onClose | Funktion | Rückruffunktion wird ausgelöst, wenn das Dropdown geschlossen wird |
|
|
| onOpen | Funktion | Rückruffunktion wird ausgelöst, wenn das Dropdown geöffnet wird |
|
|
| Variante | Zeichenkette | Die visuelle Stilvariante des klickbaren Symbols. Optionen umfassen: `primary`, `secondary` und `tertiary` |
|
|
|
|
|
|
|
|
|
|
</Tab>
|
|
</Tabs>
|