kirillzyusko / react-native-keyboard-controller

Keyboard manager which works in identical way on both iOS and Android
https://kirillzyusko.github.io/react-native-keyboard-controller/
MIT License
1.54k stars 61 forks source link

fix: crash on web #367

Closed kirillzyusko closed 6 months ago

kirillzyusko commented 6 months ago

📜 Description

Fixed a crash on web.

💡 Motivation and Context

It was a regression since 1.10.0 version. PlatformColor is not available on web and it will throw exception, because KeyboardToolbar is exported from index file and will be evaluated as soon as something gets imported from the package (i. e. KeyboardProvider).

To fix the problem I created two files: colors.ts (all platforms excluding mobile) and colors.native.ts (for mobile).

📢 Changelog

JS

🤔 How Has This Been Tested?

Tested on web project.

📸 Screenshots (if appropriate):

image

📝 Checklist

github-actions[bot] commented 6 months ago

📊 Package size report

Current size Target Size Difference
134358 bytes 133694 bytes 664 bytes 📈
hyochan commented 6 months ago

When will this be released 🤔 ?

kirillzyusko commented 6 months ago

@hyochan will try to do tomorrow or over the weekend 👀