callstack / callstack/react-native-paper

Icon in IconButton not centered and cannot be centered

Offen
#4,829 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug Icon Button
Vorherrschende Sprache
TypeScript
Sterne
14.5k
Forks
2.2k
Ø Merge
5 T. 23 Std.
Gemergte PRs (30 T.)
12

Beschreibung

### Current behaviour
Icon in IconButton is not centered

### Expected behaviour
Icon to be centered

### How to reproduce?
Add background color to IconButton using the style prop.

### Preview

Image

### What have you tried so far?
Adding `alignItems: 'center'` and `justifyContent: 'center'` to both `style` and `contentStyle`. `style` aligned the trash can icon a little bit horizontally, but it was still off.

Adding `backgroundColor` to both `style` and `contentStyle`.

### Your Environment

| software | version
| --------------------- | -------
| ios | x
| android | 13
| react-native | 0.82.1
| react-native-paper | 5.14.5
| node | 22.11.0
| npm or yarn | x.x.x
| expo sdk | x.x.x

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.