-
Notifications
You must be signed in to change notification settings - Fork 110
Add customizable labelStyle #142
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
Conversation
@mmazzarolo would you be open to accepting this PR? Otherwise we'll have to fork the library, but my goal today was to abandon our old fork of the library to upgrade to the new version which supports dark/light theme natively. |
|
||
export interface DialogInputProps extends TextInputProps { | ||
label?: ReactNode; | ||
labelStyle?: StyleProp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure of proper value here
Hey @slapbox ! Thanks for this PR. |
It's working based on the native settings, but there's no way to override light mode to force dark themes besides passing in custom styling, right? Our goal is to allow a dark dialog when our app is in dark mode, even if the system-level preference is set to light mode. |
@slapbox I understand. Yeah, you're right. Question: would it be enough for your use case to be able to "force" one of the two styles (dark/light) with a prop instead of supplying your own custom style? I'm asking this because I'd like to keep the customization options to the minimum. |
Ha! Just noticed you suggested something similar here: #141 (comment) :) |
I think yes, but I tried implementing that yesterday by modifying the component files to take an |
Oh. I thought it should be able to get that value regardless of the current theme, but I'm not sure :/ |
Any thoughts on these changes I tried making? Did I overlook something? I'm doing more research into this myself also. |
I managed to get a single dark mode color working in light mode in an Expo Snack, which gives me at least a starting point and some proof that you can access light/dark colors outside of their respective modes. But I can't get them working in the app, or even any colors to work in this example: https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/PlatformColor/PlatformColorExample.js Quite strange, but some minor progress. |
Thanks for the update @slapbox 🙏 |
I think this would also need to be implemented in |
@slapbox copy-paste from the other thread:
(or use this PR) |
I'll close this PR and submit a new one soon along the lines of our discussion in #141. |
Overview
Add an additional style prop to the
Dialog.Input
Test Plan
Why: I'm trying to implement custom styles for when users use dark/light mode and the system is set to the opposite color scheme - but I've hit a wall with trying to style the inputs. Basically everything else seems to be possible with the current API, but changing the label color is not currently possible.