-
-
Notifications
You must be signed in to change notification settings - Fork 19
Code cleanup #33
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
Code cleanup #33
Conversation
First finish #32 so changes can be merged into here |
Please add the issue #31 feature needed i.e. the left icon prop in the text input. And thank you for your work. |
@srivastavaanurag79 added that option too, could you look at #32 so I can merge that back into here? |
Dialog label changes have been ported into here instead: Currently it's not possible to separately style the close and done buttons. Suggested changes:
|
Error: Unable to resolve module react-native-paper/lib/typescript/src/core/theming |
did you remove the icon and everything? |
can you please attach some screenshots of what it looks like now? |
why have you wrapped it again inside a provider? people who would add react-native-paper will add their main app inside provider. |
I pulled the repo and installed react-native-paper like normal, it could be there's a package update which prevents you from building it locally.
Some properties have been moved to
Will do a bit later, is there a way I can actually run the app locally. Is it possible to run the example using local version of the code?
There's 2 different providers, PaperProvider and ThemeProvider. The first one is from react-native-paper themselves to supply the theme prop aswell as do other things underwater. ThemeProvider is the actual supply mechanism for the theme to MUI components. You can see that behaviour here: https://github.com/callstack/react-native-paper/blob/main/src/core/Provider.tsx and https://github.com/callstack/react-native-paper/blob/main/src/core/theming.tsx#L31 By doing it this way you don't have to manually pass |
You changed a lot of things, and it isn't working in my system. It keeps throwing the error I sent you react-native-paper v5.5.1 is installed for me previously I was using v4.9.2 |
My version is 5.5.1 too, could you maybe clean your node_modules? The import is correct, also:
|
I am running the local version of the example and the error still persists. Done clean install still same error: Error: Unable to resolve module react-native-paper/lib/typescript/src/core/theming
|
@srivastavaanurag79 I changed the imports and swapped |
Revamped the entire documentation to better reflect all the properties, aswell as describe newly added properties.
Code changes to remove unnecessary properties, merged certain properties into objects, used proper typings where possible.
Property renames:
checkboxColor
->checkboxProps.checkboxColor
checkboxUncheckedColor
->checkboxProps.checkboxUncheckedColor
checkboxLabelStyle
->checkboxProps.checkboxLabelStyle
checkboxLabelStyle
->checkboxProps.checkboxLabelStyle
searchPlaceholder
->searchText
Property type changes:
searchStyle
changed from custom object to ViewStyledialogStyle
changed from custom object to ViewStyletheme
changed from custom object to ThemeProp (no effective change)Other changes:
textInputMode
now defaults to "flat" to follow react-native-paper defaultsuseInternalTheme
to automatically grab the theme from the provider, giving the option to override the style on a per-component basisNo functionality should work differently after this PR, short of property changes, so it will be a breaking change.
Users may see differences in styling in some places (for example the defaulting to "flat", better respecting MUI theme, etc)
resolves #31