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

[Feature Request]: PasswordInput property doesn't exist in TextInput type #16290

Closed
1 task done
martinscooper opened this issue Apr 30, 2024 · 4 comments
Closed
1 task done

Comments

@martinscooper
Copy link

The problem

Using Carbon in a Typescript nextjs project, I am using the PasswordInput component and the tsc throws this error:

Type error: Property 'PasswordInput' does not exist on type 'ForwardRefExoticComponent<TextInputProps & RefAttributes<unknown>>'.

I am using the code from here:

<TextInput.PasswordInput id="text-input-1" labelText="Text input label" helperText="Optional help text" autoComplete="true" />

The solution

The PasswordInput should be added to the TextInput types or made available separately. I would like to be able to perform the following import statement:

import { PasswordInput } from '@carbon/react'

Examples

No response

Application/PAL

No response

Business priority

Low Priority = release date is not dependent on fix or not upcoming

Available extra resources

No response

Code of Conduct

Copy link
Contributor

Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team.

If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.

@martinscooper
Copy link
Author

The console shows the following warning when using PasswordInput by accesing it through TextInput:

Warning: The PasswordInput field has been deprecated on the TextInput object. Please import and use PasswordInput directly.

But when I import it directly from @carbon/react the ts compiler shows the following error:

Module '"@carbon/react"' has no exported member 'PasswordInput'

@guidari
Copy link
Contributor

guidari commented Jun 7, 2024

Hey @martinscooper
Are you still experiencing the error? I just imported the component in .tsx file and it is working fine with no errors in the console or code.
Can you open a StackBlitz if you are still having the issue, please?

Screenshot 2024-06-07 at 09 31 12

@guidari guidari moved this from ⏱ Backlog to 🏗 In Progress in Design System Jun 7, 2024
@guidari guidari closed this as not planned Won't fix, can't repro, duplicate, stale Jun 19, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In Progress to ✅ Done in Design System Jun 19, 2024
@martinscooper
Copy link
Author

@guidari Thanks for taking a look and sorry for my delayed response. We actually chose to not to use that component. The main reason of this was that we couldn't find a way to stop the browser from asking the user to remember the password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants