diff --git a/api-generator/components/password.js b/api-generator/components/password.js
index 665ea48a1..2c9492670 100644
--- a/api-generator/components/password.js
+++ b/api-generator/components/password.js
@@ -68,13 +68,13 @@ const PasswordProps = [
{
name: 'hideIcon',
type: 'string',
- default: 'pi pi-eye-slash',
+ default: 'null',
description: 'Icon to hide displaying the password as plain text.'
},
{
name: 'showIcon',
type: 'string',
- default: 'pi pi-eye',
+ default: 'null',
description: 'Icon to show displaying the password as plain text.'
},
{
@@ -142,15 +142,23 @@ const PasswordProps = [
const PasswordSlots = [
{
name: 'header',
- description: "Custom content for the component's header"
+ description: "Custom content for the component's header."
},
{
name: 'content',
- description: 'Custom content for the component'
+ description: 'Custom content for the component.'
},
{
name: 'footer',
- description: "Custom content for the component's footer"
+ description: "Custom content for the component's footer."
+ },
+ {
+ name: 'hideicon',
+ description: 'Custom content for the hide icon.'
+ },
+ {
+ name: 'showicon',
+ description: 'Custom content for the show icon.'
}
];
diff --git a/components/lib/password/Password.d.ts b/components/lib/password/Password.d.ts
index 330f5b686..5e7045a17 100755
--- a/components/lib/password/Password.d.ts
+++ b/components/lib/password/Password.d.ts
@@ -61,12 +61,10 @@ export interface PasswordProps extends InputHTMLAttributes {
toggleMask?: boolean | undefined;
/**
* Icon to hide displaying the password as plain text.
- * @defaultValue pi pi-eye-slash
*/
hideIcon?: string | undefined;
/**
* Icon to show displaying the password as plain text.
- * @defaultValue pi pi-eye
*/
showIcon?: string | undefined;
/**
@@ -141,6 +139,14 @@ export interface PasswordSlots {
* Custom content template.
*/
content(): VNode[];
+ /**
+ * Custom hide icon template.
+ */
+ hideicon(): VNode[];
+ /**
+ * Custom show icon template.
+ */
+ showicon(): VNode[];
}
/**
diff --git a/components/lib/password/Password.vue b/components/lib/password/Password.vue
index 28651658b..c7be8a1bc 100755
--- a/components/lib/password/Password.vue
+++ b/components/lib/password/Password.vue
@@ -21,7 +21,12 @@
@invalid="onInvalid"
v-bind="inputProps"
/>
-
+
+
+
+
+
+
{{ infoText }}
@@ -43,6 +48,8 @@