callstack / callstack/react-native-paper
Expose adjustsFontSizeToFit as new prop for Button
- Ngôn ngữ chính
- TypeScript
- Star
- 14.5k
- Fork
- 2.2k
- Merge trung bình
- 5 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 12
Mô tả
**Is your feature request related to a problem? Please describe.**
On some devices button text gets truncated due to `numberOfLines={1}` being applied to the `Text` label.
**Describe the solution you'd like**
`adjustsFontSizeToFit` exists and provides an easy way to keep the entire label visible.
**Describe alternatives you've considered**
I have attempted to do this myself by passing a `Text` element as a child to the button like so:
```
{text}
```
This unfortunately did not work. Only by editing the `Button` itself did iOS respect the `adjustsFontSizeToFit` prop.
**Additional context**
It looks like there is an existing pull request for this (although it's missing context):
#4125
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu từ phần triển khai Button render nhãn Text, sau đó xem xét ngữ cảnh của pull request #4125. Expose adjustsFontSizeToFit dưới dạng prop của Button và xác minh rằng nhãn vẫn hiển thị trên iOS khi nếu không thì văn bản sẽ bị cắt ngắn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- react-native, typescript
- Lĩnh vực
- mobile
- Loại issue
- Tính năng
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 55/100