Skip to content

Commit 106f83f

Browse files
committed
Use inert instead to disable the whole thing
Related: - DefinitelyTyped/DefinitelyTyped#60822 - facebook/react#24730
1 parent 3774b73 commit 106f83f

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

app/dynamic-pay-button/DynamicPayButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ export const DynamicPayButton = () => {
7272
'has-[:focus-visible]:outline-black/30 dark:has-[:focus-visible]:outline-white/20':
7373
!open,
7474
'overflow-visible': overflow,
75-
'pointer-events-none': loading,
7675
},
7776
)}
77+
inert={loading ? '' : undefined}
7878
onAnimationComplete={variant => {
7979
variant === 'open' && inputRef.current?.focus({ preventScroll: true });
8080
variant === 'closed' &&

app/dynamic-pay-button/PayButton.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export const PayButton = ({ className }: PayButtonProps) => {
3232
},
3333
className,
3434
)}
35-
disabled={success || loading}
3635
onClick={handleLoading}
3736
>
3837
<AnimateDimension

app/dynamic-pay-button/TabContent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ const TabContentCard = () => {
7373
success,
7474
},
7575
)}
76-
disabled={success || loading}
7776
maxLength={3}
7877
onChange={e => setCcv(e.target.value)}
7978
pattern="\d*"

types/types.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
declare module 'tailwindcss/lib/util/flattenColorPalette';
22
declare module 'tailwindcss/lib/util/color';
3+
4+
declare namespace React {
5+
interface HTMLAttributes {
6+
inert?: '';
7+
}
8+
}

0 commit comments

Comments
 (0)