callstack / callstack/react-native-paper

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

オープン
#4,508 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
Checkbox feature request RadioButton
主要言語
TypeScript
スター
14.5k
フォーク
2.2k
平均マージ
5日 23時間
マージ済み PR(30日)
12

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start at the RadioButton.Item and Checkbox.Item component entry points and inspect how their label and labelStyle props reach the underlying Text element. Compare both implementations, then verify that the requested text props or custom label rendering work for longer labels and text scaling without breaking existing usage.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react-native, typescript
領域
frontend, mobile
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。