Commit 88b45be
committed
fix: ensure transparent and backdropColor take precedence over style prop
Reorder the style array so explicit Modal API props (transparent,
backdropColor) always win over the generic style prop. Move the
default backgroundColor into styles.container so user styles can
override the default but not the explicit props.
Precedence: styles.container (default white) → this.props.style → containerStyles
- <Modal style={{ backgroundColor: 'red' }}> → red (user overrides default)
- <Modal transparent> → transparent (explicit prop wins over style)
- <Modal transparent style={{ backgroundColor: 'red' }}> → transparent wins
- <Modal backdropColor="blue" style={{ backgroundColor: 'red' }}> → blue wins
- <Modal style={{ padding: 20 }}> → works, no conflicts1 parent ad0f25d commit 88b45be
1 file changed
Lines changed: 12 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
297 | 301 | | |
298 | 302 | | |
299 | 303 | | |
| |||
349 | 353 | | |
350 | 354 | | |
351 | 355 | | |
352 | | - | |
| 356 | + | |
353 | 357 | | |
354 | 358 | | |
355 | 359 | | |
| |||
380 | 384 | | |
381 | 385 | | |
382 | 386 | | |
| 387 | + | |
383 | 388 | | |
384 | 389 | | |
385 | 390 | | |
| |||
0 commit comments