callstack / callstack/react-native-paper
Not Able to change background color of entire searchbar using className
- 主要语言
- TypeScript
- 星标
- 14.5k
- 派生
- 2.2k
- 平均合并
- 5 天 23 小时
- 30 天内合并 PR
- 12
描述
### Current behaviour
I am using the Searchbar component with icon and I want to apply some nativewind style to the entire searchbar, I tried using className but it does not seems to be working.
Now if try adding style prop it does works but we are not following the style prop flow.
The cause I've found is that there is no use of {...rest} prop in the Surface component.
My solution is that we should have another class that should be passed from SearchBar and applied on the Surface component.
### Expected behaviour
Upon passing the className it should apply on the Internal Surface component as well.
### How to reproduce?
Use the Searchbar component.
pass nativewind classes using className.
### Preview
React Native Paper SearchBar Code
UI:
### What have you tried so far?
### Your Environment
| software | version
| --------------------- | -------
| react-native | 0.81.4
| react-native-paper | 5.14.5
| node | 20.19.5
贡献指南
调研方向
从 Searchbar 组件开始,检查 props 如何传递到其内部的 Surface 组件,重点关注 issue 中描述的 className 行为。复现 NativeWind 的 background-color 场景,并确认传入 className 会按预期改变整个 Searchbar 表面。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native, typescript
- 领域
- mobile
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100