File tree Expand file tree Collapse file tree
types/src/shared/inputotp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304193,6 +304193,30 @@
304193304193 "default": "",
304194304194 "description": "The children to render."
304195304195 },
304196+ {
304197+ "name": "size",
304198+ "optional": true,
304199+ "readonly": false,
304200+ "type": "\"small\" | \"large\" | \"normal\"",
304201+ "default": "",
304202+ "description": "Defines the size of the InputText."
304203+ },
304204+ {
304205+ "name": "variant",
304206+ "optional": true,
304207+ "readonly": false,
304208+ "type": "\"outlined\" | \"filled\"",
304209+ "default": "",
304210+ "description": "Specifies the input variant of the component."
304211+ },
304212+ {
304213+ "name": "disabled",
304214+ "optional": true,
304215+ "readonly": false,
304216+ "type": "boolean",
304217+ "default": "false",
304218+ "description": "When present, it specifies that the element should be disabled."
304219+ },
304196304220 {
304197304221 "name": "value",
304198304222 "optional": true,
Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ import { InputOtp } from 'primereact/inputotp';
33export default function FilledDemo ( ) {
44 return (
55 < div className = "card flex justify-center" >
6- < InputOtp defaultValue = { '' } >
7- < InputOtp . Text variant = "filled" />
8- < InputOtp . Text variant = "filled" />
9- < InputOtp . Text variant = "filled" />
10- < InputOtp . Text variant = "filled" />
6+ < InputOtp defaultValue = { '' } variant = "filled" >
7+ < InputOtp . Text />
8+ < InputOtp . Text />
9+ < InputOtp . Text />
10+ < InputOtp . Text />
1111 </ InputOtp >
1212 </ div >
1313 ) ;
Original file line number Diff line number Diff line change @@ -3,23 +3,23 @@ import { InputOtp } from 'primereact/inputotp';
33export default function SizesDemo ( ) {
44 return (
55 < div className = "card flex flex-col items-center gap-4" >
6- < InputOtp defaultValue = { '' } >
7- < InputOtp . Text size = "small" />
8- < InputOtp . Text size = "small" />
9- < InputOtp . Text size = "small" />
10- < InputOtp . Text size = "small" />
6+ < InputOtp defaultValue = { '' } size = "small" >
7+ < InputOtp . Text />
8+ < InputOtp . Text />
9+ < InputOtp . Text />
10+ < InputOtp . Text />
1111 </ InputOtp >
1212 < InputOtp defaultValue = { '' } >
1313 < InputOtp . Text />
1414 < InputOtp . Text />
1515 < InputOtp . Text />
1616 < InputOtp . Text />
1717 </ InputOtp >
18- < InputOtp defaultValue = { '' } >
19- < InputOtp . Text size = "large" />
20- < InputOtp . Text size = "large" />
21- < InputOtp . Text size = "large" />
22- < InputOtp . Text size = "large" />
18+ < InputOtp defaultValue = { '' } size = "large" >
19+ < InputOtp . Text />
20+ < InputOtp . Text />
21+ < InputOtp . Text />
22+ < InputOtp . Text />
2323 </ InputOtp >
2424 </ div >
2525 ) ;
Original file line number Diff line number Diff line change @@ -3,5 +3,8 @@ import type { InputOtpProps } from '@primereact/types/shared/inputotp';
33
44export const defaultProps : InputOtpProps = {
55 ...HeadlessInputOtp . defaultProps ,
6- as : 'div'
6+ as : 'div' ,
7+ size : undefined ,
8+ variant : undefined ,
9+ disabled : false
710} ;
Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ export const InputOtpText = withComponent({
3131 type : inputotp ?. inputType ( ) ,
3232 inputMode : inputotp ?. inputMode ( ) ,
3333 className : inputotp ?. cx ( 'text' ) ,
34+ size : inputotp ?. props . size ?? props . size ,
35+ variant : inputotp ?. props . variant ?? props . variant ,
36+ disabled : inputotp ?. props . disabled ?? props . disabled ,
3437 'data-pc-index' : index ,
3538 onInput : ( e : React . FormEvent < HTMLInputElement > ) => inputotp ?. onInput ?.( e , index ) ,
3639 onClick : inputotp ?. onClick ,
Original file line number Diff line number Diff line change @@ -34,7 +34,21 @@ export interface InputOtpPassThrough {
3434/**
3535 * Defines valid properties in InputOtp component.
3636 */
37- export interface InputOtpProps extends BaseComponentProps < InputOtpInstance , useInputOtpProps , InputOtpPassThrough > { }
37+ export interface InputOtpProps extends BaseComponentProps < InputOtpInstance , useInputOtpProps , InputOtpPassThrough > {
38+ /**
39+ * Defines the size of the InputText.
40+ */
41+ size ?: 'small' | 'normal' | 'large' | undefined ;
42+ /**
43+ * Specifies the input variant of the component.
44+ */
45+ variant ?: 'outlined' | 'filled' | undefined ;
46+ /**
47+ * When present, it specifies that the element should be disabled.
48+ * @default false
49+ */
50+ disabled ?: boolean | undefined ;
51+ }
3852
3953/**
4054 * Defines valid state in InputOtp component.
You can’t perform that action at this time.
0 commit comments