Skip to content
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

Expose text field background / foreground colors to enable dark mode support #234

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

msmollin
Copy link

@msmollin msmollin commented Jul 15, 2022

Summary

The text field background and foreground color for the main search bar component is not dark mode aware, so this PR exposes them for 3rd party developers to override and customize.

Result

The Xcode project in this repository seems to require special local configuration in order to build from the project file, so I opened the Package.swift file and made sure the changes built using the package declarations (which it did).

Also I made a minor update to specify the generic type of the button label in order to satisfy Swift's compiler in Xcode 13.4.1 which could not figure out the Button's label type. If you find this unnecessary I'm happy to remove it.

@msmollin msmollin changed the title Expose text field background color to enable dark mode support Expose text field background / foreground colors to enable dark mode support Jul 16, 2022
@VladislavFitz
Copy link
Contributor

Hi @msmollin ,
Thank you for your contribution.

The Xcode project in this repository seems to require special local configuration

The Xcode project file is there only for Carthage support, you did right using the Package.swift file.

I made a minor update to specify the generic type of the button label in order to satisfy Swift's compiler in Xcode 13.4.1 which could not figure out the Button's label type.

I have no issue in Xcode 13.4.1. Did you try it on another machine?

Could you also provide a snippet of how you consider to use these parameters in a real SwiftUI view?
I suppose you might add these new parameters to initializer with default values to ensure a better developer experience.

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.

3 participants