Skip to content

fix(web): avoid deprecated shadow props - #601

Merged
calintamas merged 1 commit into
calintamas:mainfrom
huytdps13400:fix/600-web-shadow-style
Aug 29, 2026
Merged

fix(web): avoid deprecated shadow props#601
calintamas merged 1 commit into
calintamas:mainfrom
huytdps13400:fix/600-web-shadow-style

Conversation

@huytdps13400

Copy link
Copy Markdown
Contributor

Summary

  • use a web-only boxShadow for BaseToast instead of the deprecated React Native shadow* style props
  • keep the existing native shadowOffset, shadowOpacity, and shadowRadius behavior unchanged
  • keep Android elevation shared across platforms
  • add platform-isolated regression tests for both style branches

Because React Native Web preprocesses StyleSheet.create eagerly, this prevents the warning even when an app imports the package with a fully custom toast config and never renders BaseToast.

Fixes #600

Test Plan

  • RED: yarn test src/components/__tests__/BaseToast.styles.test.ts --runInBand failed because the web style had no boxShadow and still contained all three deprecated shadow props
  • focused regression: 2 tests passed
  • yarn quality: type-check, lint, 19 suites / 85 tests passed, 100% statement/branch/function/line coverage
  • yarn build
  • git diff --check

I also verified the mapping against React Native Web 0.21.2's official StyleSheet preprocessor: any shadow* key triggers the warning and is translated to an equivalent CSS boxShadow string.

@calintamas
calintamas merged commit 12feaec into calintamas:main Aug 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[web] Deprecated "shadow*" style props in BaseToast.styles warn on import, even with a custom config

2 participants