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
- 主要语言
- TypeScript
- 星标
- 14.5k
- 派生
- 2.2k
- 平均合并
- 5 天 23 小时
- 30 天内合并 PR
- 12
描述
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).
贡献指南
调研方向
从 src/components/SegmentedButtons/SegmentedButtonItem.tsx 中分段按钮项的样式及其 paddingHorizontal 值开始。检查该组件目前如何提供样式设置或自定义,然后实现所请求的更小水平内边距,或让用户能够控制它。完成标准是分段按钮不再强制使用所报告的过大间距。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native, typescript
- 领域
- frontend, mobile
- Issue 类型
- 功能
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100