2674589b44
## Remove all Recoil references and replace with Jotai ### Summary - Removed every occurrence of Recoil from the entire codebase, replacing with Jotai equivalents where applicable - Updated `README.md` tech stack: `Recoil` → `Jotai` - Rewrote documentation code examples to use `createAtomState`/`useAtomState` instead of `atom`/`useRecoilState`, and removed `RecoilRoot` wrappers - Cleaned up source code comment and Cursor rules that referenced Recoil - Applied changes across all 13 locale translations (ar, cs, de, es, fr, it, ja, ko, pt, ro, ru, tr, zh)
50 lines
2.5 KiB
Plaintext
50 lines
2.5 KiB
Plaintext
---
|
|
title: アイコンピッカー
|
|
image: /images/user-guide/github/github-header.png
|
|
---
|
|
|
|
<Frame>
|
|
<img src="/images/user-guide/github/github-header.png" alt="ヘッダー" />
|
|
</Frame>
|
|
|
|
ドロップダウンベースのアイコンピッカーで、ユーザーがリストからアイコンを選択できます。
|
|
|
|
<Tabs>
|
|
<Tab title="使用方法">
|
|
```jsx
|
|
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 (
|
|
<IconPicker
|
|
disabled={false}
|
|
onChange={handleIconChange}
|
|
selectedIconKey={selectedIcon}
|
|
variant="primary"
|
|
/>
|
|
);
|
|
};
|
|
```
|
|
</Tab>
|
|
|
|
<Tab title="プロパティ">
|
|
| プロパティ | タイプ | 説明 |
|
|
| --------------- | ------ | ------------------------------------------------------------------------------ |
|
|
| 無効 | ブール型 | `true` に設定されるとアイコンピッカーは無効になります |
|
|
| onChange | 関数 | ユーザーがアイコンを選択したときにトリガーされるコールバック関数。 それは `iconKey` と `Icon` プロパティを持つオブジェクトを受け取ります |
|
|
| selectedIconKey | string | 最初に選択されたアイコンのキー |
|
|
| onClickOutside | 関数 | ユーザーがドロップダウン外をクリックしたときにトリガーされるコールバック関数 |
|
|
| onClose | 関数 | ドロップダウンが閉じられたときにトリガーされるコールバック関数 |
|
|
| onOpen | 関数 | ドロップダウンが開かれたときにトリガーされるコールバック関数 |
|
|
| バリアント | string | クリック可能なアイコンのビジュアルスタイルバリアント。 オプションには `primary`、 `secondary`、 `tertiary` が含まれます |
|
|
</Tab>
|
|
</Tabs>
|