File tree Expand file tree Collapse file tree
apps/showcase/demo/inputotp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { InputOtp } from 'primereact/inputotp';
33export default function BasicDemo ( ) {
44 return (
55 < div className = "card flex justify-center" >
6- < InputOtp defaultValue = { '' } >
6+ < InputOtp >
77 < InputOtp . Text />
88 < InputOtp . Text />
99 < InputOtp . Text />
Original file line number Diff line number Diff line change @@ -3,12 +3,12 @@ import { InputOtp } from 'primereact/inputotp';
33export default function CustomDemo ( ) {
44 return (
55 < div className = "card flex justify-center" >
6- < InputOtp defaultValue = { '' } >
6+ < InputOtp >
77 { Array . from ( { length : 4 } , ( _ , index ) => {
88 return (
99 < InputOtp . Text
1010 key = { index }
11- className = "w-[40px] text-4xl appearance-none text-center transition-all duration-200 bg-transparent border-0 border-b-2 border-b-[var(--p-inputtext-border-color)] rounded-none focus:outline-none focus:border-b-[var(--p-primary-color)]"
11+ className = "w-[40px] text-4xl appearance-none shadow-none text-center transition-all duration-200 bg-transparent border-0 border-b-2 border-b-[var(--p-inputtext-border-color)] rounded-none focus:outline-none focus:border-b-[var(--p-primary-color)]"
1212 />
1313 ) ;
1414 } ) }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { InputOtp } from 'primereact/inputotp';
33export default function FilledDemo ( ) {
44 return (
55 < div className = "card flex justify-center" >
6- < InputOtp defaultValue = { '' } variant = "filled" >
6+ < InputOtp variant = "filled" >
77 < InputOtp . Text />
88 < InputOtp . Text />
99 < InputOtp . Text />
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { InputOtp } from 'primereact/inputotp';
22
33export default function InputOtpPTDemo ( ) {
44 return (
5- < InputOtp defaultValue = { '' } >
5+ < InputOtp >
66 < InputOtp . Text />
77 < InputOtp . Text />
88 < InputOtp . Text />
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { InputOtp } from 'primereact/inputotp';
33export default function IntegerOnlyDemo ( ) {
44 return (
55 < div className = "card flex justify-center" >
6- < InputOtp defaultValue = { '' } integerOnly >
6+ < InputOtp integerOnly >
77 < InputOtp . Text />
88 < InputOtp . Text />
99 < InputOtp . Text />
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { InputOtp } from 'primereact/inputotp';
33export default function MaskDemo ( ) {
44 return (
55 < div className = "card flex justify-center" >
6- < InputOtp defaultValue = { '' } mask >
6+ < InputOtp mask >
77 { Array . from ( { length : 4 } , ( _ , index ) => (
88 < InputOtp . Text key = { index } />
99 ) ) }
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export default function SampleDemo() {
99 < div className = "flex flex-col items-center" >
1010 < div className = "font-bold text-xl mb-2" > Authenticate Your Account</ div >
1111 < p className = "text-surface-500 dark:text-surface-400 block mb-8" > Please enter the code sent to your phone.</ p >
12- < InputOtp defaultValue = { '' } className = "gap-0" >
12+ < InputOtp className = "gap-0" >
1313 { Array . from ( { length : 6 } , ( _ , index ) => {
1414 const inputClasses = [
1515 'w-12 h-12 text-2xl appearance-none text-center transition-all duration-200' ,
Original file line number Diff line number Diff line change @@ -3,19 +3,19 @@ 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 = { '' } size = "small" >
6+ < InputOtp size = "small" >
77 < InputOtp . Text />
88 < InputOtp . Text />
99 < InputOtp . Text />
1010 < InputOtp . Text />
1111 </ InputOtp >
12- < InputOtp defaultValue = { '' } >
12+ < InputOtp >
1313 < InputOtp . Text />
1414 < InputOtp . Text />
1515 < InputOtp . Text />
1616 < InputOtp . Text />
1717 </ InputOtp >
18- < InputOtp defaultValue = { '' } size = "large" >
18+ < InputOtp size = "large" >
1919 < InputOtp . Text />
2020 < InputOtp . Text />
2121 < InputOtp . Text />
You can’t perform that action at this time.
0 commit comments