Skip to content

feat: Support LocalizedStringKey with TextFieldΒ #130

@GerardPaligot

Description

@GerardPaligot

Is your request related to a problem? Please describe.

Describe the solution you'd like

For now, when I would like to use vitaminTextFieldStyle or directly the Vitamin component, I can only pass a String for the label and helperText.

    public func vitaminTextFieldStyle(
        style: VitaminTextFieldStyle = .outlined,
        label: String,
        helperText: String? = nil,
        state: Binding<VitaminTextFieldState>,
        icon: VitaminTextField.IconConfiguration? = nil,
        characterLimit: VitaminTextField.CharacterLimitConfiguration? = nil
    )

We should add variant to support LocalizedStringKey in addition to the existing API.

    public func vitaminTextFieldStyle(
        style: VitaminTextFieldStyle = .outlined,
        label: LocalizedStringKey,
        helperText: LocalizedStringKey? = nil,
        state: Binding<VitaminTextFieldState>,
        icon: VitaminTextField.IconConfiguration? = nil,
        characterLimit: VitaminTextField.CharacterLimitConfiguration? = nil
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    community πŸ‘₯As we stopped improvements for this version ofVitamin, this issue needs to be done by the communityenhancement πŸš€New feature or request

    Type

    No type

    Projects

    Status

    πŸ”– Dev to do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions