ionic-team / ionic-team/ionicons

feat: add types for icon names

Aperta
#1,269 1 commento 1 reazione 0 assegnatari Vedi su GitHub
type: feature request
Lingua principale
TypeScript
Stelle
18.2k
Fork
2.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Describe Problem

it should be possible to type the `name` and `icon` props with available icon names

### Describe Preferred Solution

`name` could be typed as:

```typescript
type IconNames = 'accessibility' | 'accessibility-outline' | 'accessibility-sharp'...
```

`icon` could be typed as:

```typescript
type IconSource = IconNames | (string & {})
```

You can find an [explanation for the `string & {}` part on google](https://www.google.com/search?q=string+%2526+%7B%7D)

### Describe Alternatives

_No response_

### Additional Information

_No response_

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.