Skip to content

fix(shadow*): replace depracated shadow props with boxShadow #752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 17, 2025

Conversation

ozgegurel
Copy link
Contributor

Issue: Deprecated shadow* Style Props in @storybook/ondevice-controls

Using the old (shadow*) props now triggers deprecation warnings in the console, which can clutter logs and may eventually lead to broken or unsupported styles in future React Native releases.

Screenshot 2025-06-16 at 14 52 59

What I did

  • Replaced deprecated React Native shadow style properties (shadow*) with the modern boxShadow property
  • Updated styling in color picker components to use the new boxShadow syntax
  • Fixed deprecation warnings in the codebase

How to test

  1. Install dependencies and build the packages from the root directory:
    yarn install
    yarn build
  2. Navigate to the example app and run it on iOS:
    cd examples/expo-example
    yarn ios
  3. Open the color picker from Color Example on ios and verify that shadows are rendered correctly.
  4. Confirm that no shadow-related deprecation warnings appear in the console.

Does this need a new example in examples/expo-example?

No, the changes are internal styling updates that don't require new examples.

Does this need an update to the documentation?

No, this is a technical implementation change that doesn't affect the public API or usage patterns.

Additional Notes

  • This change follows React Native's current styling best practices
  • The fix is backward compatible and doesn't introduce any breaking changes
  • The update improves code quality by removing deprecation warnings

@dannyhw
Copy link
Member

dannyhw commented Jun 17, 2025

Thanks for the pr! LGTM

@dannyhw dannyhw merged commit 86e133f into storybookjs:next Jun 17, 2025
1 check 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.

2 participants