forlogic-core 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -304,14 +304,16 @@ const [color, setColor] = useState('#3b82f6')
|
|
|
304
304
|
|
|
305
305
|
### Icon Picker
|
|
306
306
|
|
|
307
|
-
Seletor de ícones
|
|
307
|
+
Seletor de ícones Material Symbols Outlined com busca integrada e opção 'sem ícone'.
|
|
308
308
|
|
|
309
309
|
**Uso:**
|
|
310
310
|
```tsx
|
|
311
|
-
import { IconPicker } from "forlogic-core"
|
|
311
|
+
import { IconPicker, type IconPickerIcon } from "forlogic-core"
|
|
312
312
|
import { useState } from 'react'
|
|
313
313
|
|
|
314
|
-
const [icon, setIcon] = useState(
|
|
314
|
+
const [icon, setIcon] = useState<IconPickerIcon | null>(
|
|
315
|
+
{ name: 'star_rate', filled: true }
|
|
316
|
+
)
|
|
315
317
|
|
|
316
318
|
<IconPicker
|
|
317
319
|
value={icon}
|
|
@@ -323,8 +325,8 @@ const [icon, setIcon] = useState('Star')
|
|
|
323
325
|
**Props:**
|
|
324
326
|
| Prop | Tipo | Padrão | Descrição |
|
|
325
327
|
|------|------|--------|-----------|
|
|
326
|
-
| `value` | `
|
|
327
|
-
| `onChange` | `(
|
|
328
|
+
| `value` | `IconPickerIcon | null` | null | Ícone selecionado ({ name, filled }). |
|
|
329
|
+
| `onChange` | `(icon: IconPickerIcon | null) => void` | - | Callback quando o ícone é alterado. |
|
|
328
330
|
| `label` | `string` | - | Label opcional para o campo. |
|
|
329
331
|
|
|
330
332
|
**Acessibilidade:**
|
|
@@ -333,6 +335,7 @@ const [icon, setIcon] = useState('Star')
|
|
|
333
335
|
- Títulos descritivos em cada ícone
|
|
334
336
|
- Indicador visual de seleção
|
|
335
337
|
- Scroll area com navegação adequada
|
|
338
|
+
- Opção para remover ícone selecionado
|
|
336
339
|
|
|
337
340
|
> Fonte: `src\design-system\docs\components\IconPickerDoc.tsx`
|
|
338
341
|
|