callstack / callstack/react-native-paper

Not Able to change background color of entire searchbar using className

Đang mở
#4,817 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
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ả

### 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
Image

UI:
Image

### 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu từ component Searchbar và kiểm tra cách props được truyền đến component Surface bên trong, tập trung vào hành vi của className được mô tả trong issue. Tái hiện trường hợp NativeWind với background-color và xác nhận rằng việc truyền className sẽ thay đổi toàn bộ bề mặt Searchbar như mong đợi.

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
Lỗi
Độ 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.