Created
April 2, 2026 16:52
-
-
Save TowhidKashem/ab2bf90e9111fcccf9aaf565143caad3 to your computer and use it in GitHub Desktop.
Sonner native patch to make it as wide as the inner contents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Makes toasts as wide as their inner content, otherwise they span the full width of the screen. | |
| diff --git a/node_modules/sonner-native/.bun-tag-478b337b96d2cca6 b/node_modules/sonner-native/.bun-tag-478b337b96d2cca6 | |
| new file mode 100644 | |
| index 0000000..e69de29 | |
| diff --git a/node_modules/sonner-native/lib/module/toast.js b/node_modules/sonner-native/lib/module/toast.js | |
| index 2947986..ff3b311 100644 | |
| --- a/node_modules/sonner-native/lib/module/toast.js | |
| +++ b/node_modules/sonner-native/lib/module/toast.js | |
| @@ -307,7 +307,7 @@ export const Toast = /*#__PURE__*/React.forwardRef(({ | |
| richColors: richColors | |
| }), /*#__PURE__*/_jsxs(View, { | |
| style: { | |
| - flex: 1 | |
| + flexShrink: 1 | |
| }, | |
| children: [/*#__PURE__*/_jsx(Text, { | |
| style: [defaultStyles.title, titleStyleCtx, styles?.title], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment