Skip to content

Commit 831d844

Browse files
committed
fix: fix provided style priority in toast & notification components
1 parent d09907e commit 831d844

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
- Custom handling for safe area insets (based on `react-native-safe-area-context`'s `useSafeAreaInsets` hook) in all built-in components, plus a simple API for using the same insets in custom components. It also handles keyboard offset when a notification is displayed at a bottom `position`. All components receive an `offsets` object and a `ViewWithOffsets` component as props. Related parameters: `ignoreSafeAreaInsets`, `ignoreKeyboard`, `ignoreKeyboardHeight`, `additionalKeyboardOffset`, `additionalOffsets`.
2727
- Using new `*AnimationConfig` parameters, it is now possible to run **Spring** animations with fully customizable configurations.
2828
- Additional TypeScript types have been exported, such as `NotifierComponentProps` (for base props in custom components), `AnimationFunction`, `AnimationFunctionParams`, `Position`, `Offsets`, `ViewWithOffsetsComponent`, `Direction`, `DuplicateBehavior`, and `SwipeDirection`.
29-
- New built-in component: `SimpleToast`.
29+
- New built-in components: `Toast` and `SimpleToast`.
3030
- All components receive a `hide` function and an `animationFunctionParams` object as props.
3131

3232
### Changed

src/ui-components/Notification.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ export const NotificationComponent = ({
220220
<Text
221221
style={[
222222
s.title,
223-
titleStyle,
224223
type !== 'classic' &&
225224
useTypeColorForTitle && { color: iconColors[type] },
226225
type === 'classic' && s.classicTitle,
226+
titleStyle,
227227
]}
228228
numberOfLines={maxTitleLines}
229229
>
@@ -234,10 +234,10 @@ export const NotificationComponent = ({
234234
<Text
235235
style={[
236236
s.description,
237-
descriptionStyle,
238237
type !== 'classic' &&
239238
useTypeColorForDescription && { color: iconColors[type] },
240239
type === 'classic' && s.classicDescription,
240+
descriptionStyle,
241241
]}
242242
numberOfLines={maxDescriptionLines}
243243
>

src/ui-components/Toast.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ export const ToastComponent = ({
188188
<Text
189189
style={[
190190
s.title,
191-
titleStyle,
192191
type && useTypeColorForTitle && { color: iconColors[type] },
192+
titleStyle,
193193
]}
194194
numberOfLines={maxTitleLines}
195195
>
@@ -200,9 +200,9 @@ export const ToastComponent = ({
200200
<Text
201201
style={[
202202
s.description,
203-
descriptionStyle,
204203
type &&
205204
useTypeColorForDescription && { color: iconColors[type] },
205+
descriptionStyle,
206206
]}
207207
numberOfLines={maxDescriptionLines}
208208
>

0 commit comments

Comments
 (0)