callstack / callstack/react-native-paper

RadioButton.Item / Checkbox.Item additional props for <Text> element

Abierto
#4,508 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Checkbox feature request RadioButton
Lenguaje dominante
TypeScript
Estrellas
14.5k
Forks
2.2k
Merge medio
5 d 23 h
PR fusionados (30 d)
12

Descripción

Version: `5.11.0`

When using the RadioButton.Item and Checkbox.Item components, I cannot find a way to pass through props for the underlying component used for the labels, such as `adjustsFontSizeToFit`, `allowFontScaling` and `numberOfLines`.

This make it difficult to cater for longer label names, especially when dealing with different device sizes and OS text scaling options in Android. At present they are simply cut off, without any indication that the text continues.

Implementation options could include:

1. Provide a `labelTextProps` prop, which would allow passing through props to the component, similar to the way `labelStyle` is offered to pass through additional styles
2. Allow the current `label` prop to be either a string or a ReactNode so that users can override the implementation with something of their own creation

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.