callstack / callstack/react-native-paper
Icon in IconButton not centered and cannot be centered
- Langage dominant
- TypeScript
- Étoiles
- 14.5k
- Forks
- 2.2k
- Merge moyen
- 5 j 23 h
- PR mergées (30 j)
- 12
Description
### 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
### 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par reproduire la mise en page de IconButton sur Android avec un backgroundColor fourni via style, en utilisant les versions indiquées dans l’issue. Suivez l’implémentation de IconButton et de son conteneur d’icône afin d’identifier pourquoi les limites de l’icône sont décalées ; le travail est terminé lorsque l’icône est centrée quand le bouton possède un arrière-plan défini par style.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- react-native, typescript
- Domaine
- frontend, mobile
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100