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

Add the ability to provide a custom prompt when building SwiftUI VMDTextField #203

Merged
merged 4 commits into from
Nov 20, 2023

Conversation

dominic-plouffe
Copy link
Contributor

Description

Add a new initializer to VMDTextField allowing to customize the placeholder.

Motivation and Context

Since iOS 15, TextField provides a constructor where we can pass a Text as the prompt (placeholder).

However, the implementation of VMDTextField passes a Text(viewModel.placeholder), preventing the customization of the prompt (placeholder).

How Has This Been Tested?

Added custom foreground color to the sample

Simulator Screenshot - iPhone 15 Pro - 2023-11-14 at 14 15 19

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@dominic-plouffe dominic-plouffe merged commit bfe5241 into master Nov 20, 2023
1 check passed
@dominic-plouffe dominic-plouffe deleted the feature/vmdtextfield-prompt-ios branch November 20, 2023 12:32
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.

2 participants