callstack / callstack/react-native-paper

Incorrect styling on SnackBar

Đang mở
#4,044 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
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
It appears that the `IconButton` inside the snackbar is not properly styled to handle a color change of the snackbar.
![IMG_062353E4D1C2-1](https://github.com/callstack/react-native-paper/assets/64854392/a58d33bc-1426-4a70-bd45-1c77d2463f1b)

### Expected behaviour
![IMG_4015A60C39C1-1](https://github.com/callstack/react-native-paper/assets/64854392/f96687f9-817b-40e4-a592-f61555c45f6c)

### How to reproduce?
``` tsx
return (


Snack bar message


);
```

### What have you tried so far?
I temprarily applied a patch with [patch-package](https://github.com/ds300/patch-package/issues/296).

Here is the diff that solved my problem:
```diff
diff --git a/node_modules/react-native-paper/src/components/Snackbar.tsx b/node_modules/react-native-paper/src/components/Snackbar.tsx
index 388fc48..9f53289 100644
--- a/node_modules/react-native-paper/src/components/Snackbar.tsx
+++ b/node_modules/react-native-paper/src/components/Snackbar.tsx
@@ -328,6 +328,7 @@ const Snackbar = ({
accessibilityRole="button"
borderless
onPress={onIconPress}
+ containerColor={theme.colors.inverseSurface}
iconColor={theme.colors.inverseOnSurface}
rippleColor={rippleColor}
theme={theme}
```

### Your Environment

| software | version
| --------------------- | -------
| ios | 17
| android | 13
| react-native | 0.72.3
| react-native-paper | 5.10.0
| node | 20.5.1
| npm | 9.8.1
| expo sdk | N/A

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

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

Đánh giá

Issue này chưa được đánh giá.

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.