callstack / callstack/react-native-paper
Replace the padding horizontal in segmented buttons. The padding is too big here. Or please enable the user to control the padding
- 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ả
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used [patch-package](https://github.com/ds300/patch-package) to patch `react-native-paper@5.12.5` for the project I'm working on.
Here is the diff that solved my problem:
```diff
diff --git a/node_modules/react-native-paper/src/components/SegmentedButtons/SegmentedButtonItem.tsx b/node_modules/react-native-paper/src/components/SegmentedButtons/SegmentedButtonItem.tsx
index d88f2a4..fa41ada 100644
--- a/node_modules/react-native-paper/src/components/SegmentedButtons/SegmentedButtonItem.tsx
+++ b/node_modules/react-native-paper/src/components/SegmentedButtons/SegmentedButtonItem.tsx
@@ -262,7 +262,7 @@ const styles = StyleSheet.create({
alignItems: 'center',
justifyContent: 'center',
paddingVertical: 9,
- paddingHorizontal: 16,
+ paddingHorizontal: 6,
},
});
```
This issue body was [partially generated by patch-package](https://github.com/ds300/patch-package/issues/296).
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu trong src/components/SegmentedButtons/SegmentedButtonItem.tsx, tại phần styles của item nút phân đoạn và giá trị paddingHorizontal của nó. Kiểm tra cách component hiện đang cung cấp khả năng styling hoặc tùy chỉnh, sau đó triển khai padding ngang nhỏ hơn được yêu cầu hoặc cho phép người dùng kiểm soát giá trị này. Hoàn tất khi các nút phân đoạn không còn ép buộc khoảng cách quá lớn đã được báo cáo.
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
- frontend, 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
- 42/100