Skip to content

Commit 8c318a7

Browse files
chore: Otp demo updates
1 parent 84ef158 commit 8c318a7

8 files changed

Lines changed: 11 additions & 11 deletions

File tree

apps/showcase/demo/inputotp/basic-demo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { InputOtp } from 'primereact/inputotp';
33
export 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 />

apps/showcase/demo/inputotp/custom-demo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { InputOtp } from 'primereact/inputotp';
33
export 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
})}

apps/showcase/demo/inputotp/filled-demo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { InputOtp } from 'primereact/inputotp';
33
export 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 />

apps/showcase/demo/inputotp/inputotp-pt.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { InputOtp } from 'primereact/inputotp';
22

33
export default function InputOtpPTDemo() {
44
return (
5-
<InputOtp defaultValue={''}>
5+
<InputOtp>
66
<InputOtp.Text />
77
<InputOtp.Text />
88
<InputOtp.Text />

apps/showcase/demo/inputotp/integer-only-demo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { InputOtp } from 'primereact/inputotp';
33
export 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 />

apps/showcase/demo/inputotp/mask-demo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { InputOtp } from 'primereact/inputotp';
33
export 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
))}

apps/showcase/demo/inputotp/sample-demo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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',

apps/showcase/demo/inputotp/sizes-demo.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ import { InputOtp } from 'primereact/inputotp';
33
export 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 />

0 commit comments

Comments
 (0)