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

Unexpected Behavior in Password Component Width and Icon Customization #7633 #7634

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

Conversation

myigituzun
Copy link
Contributor

This fixes #7633

Changes Made:
1. Fixed Full-Width Issue:
• Applied styles to container elements in the Password component for all themes, ensuring proper handling of className like w-full.
2. Added New Props:
• iconClassNames: Enables assigning custom classes to toggle mask icons (showIconClassName and hideIconClassName).
• onToggleMaskClick: Provides a callback function triggered on icon clicks to allow custom logic.

Example Usage:

<div className="card flex justify-content-center">
    <Password
        value={value}
        onChange={(e) => setValue(e.target.value)}
        toggleMask
        onToggleMaskClick={(state) => console.log(state)}
        className={'w-full'}
        iconClassNames={{
            className: 'mr-8',
            showIconClassName: 'text-red-500',
            hideIconClassName: 'text-yellow-700'
        }}
    />
</div>

Visual Output:

Screenshot 2025-01-22 at 02 23 44 Screenshot 2025-01-22 at 02 24 08

Let me know if additional changes or adjustments are required!

Copy link

vercel bot commented Jan 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Updated (UTC)
primereact ⬜️ Ignored (Inspect) Visit Preview Jan 21, 2025 11:37pm
primereact-v9 ⬜️ Ignored (Inspect) Visit Preview Jan 21, 2025 11:37pm

@melloware melloware added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Jan 21, 2025
@melloware
Copy link
Member

Assigned to PrimeTek since this is a theme change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected Behavior in Password Component Width and Icon Customization
3 participants