Skip to content

Commit

Permalink
Remove obsolete type directives
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Dec 6, 2024
1 parent a50346a commit f1546d7
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/circuit-ui/components/Button/base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export function createButtonComponent<Props>(
as,
locale,
...sharedProps
} = useI18n(mapProps(props), translations);
} = useI18n(mapProps(props as Props), translations);

const components = useComponents();
const Link = components.Link as AsPropType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,9 @@ export const Dialog = forwardRef<HTMLDialogElement, DialogProps>(

return (
<>
{/* @ts-expect-error "Expression produces a union type that is too complex to represent" */}
<dialog
ref={applyMultipleRefs(ref, dialogRef)}
className={clsx(classes.dialog, className)}
// @ts-expect-error z-index can be a string
style={{
...style,
zIndex: zIndex || 'var(--cui-z-index-modal)',
Expand All @@ -155,7 +153,6 @@ export const Dialog = forwardRef<HTMLDialogElement, DialogProps>(
<div
className={classes.backdrop}
style={{
// @ts-expect-error z-index can be a string
zIndex: `calc(${zIndex?.toString() || 'var(--cui-z-index-modal)'} - 1)`,
}}
/>
Expand Down
2 changes: 0 additions & 2 deletions packages/circuit-ui/components/Popover/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,12 @@ export const Popover = ({
<Portal>
<div
className={clsx(classes.overlay, isOpen && classes.open)}
// @ts-expect-error z-index can be a string
style={{ zIndex: zIndex || 'var(--cui-z-index-popover)' }}
/>
<div
{...props}
ref={refs.setFloating}
className={clsx(classes.wrapper, isOpen && classes.open, className)}
// @ts-expect-error z-index can be a string
style={
isMobile
? mobileStyles
Expand Down
3 changes: 0 additions & 3 deletions packages/circuit-ui/components/Toggletip/Toggletip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ export const Toggletip = forwardRef<HTMLDialogElement, ToggletipProps>(
onClick={handleReferenceClick}
/>
{/* eslint-disable jsx-a11y/no-autofocus */}
{/* @ts-expect-error "Expression produces a union type that is too complex to represent" */}
<dialog
{...rest}
open={defaultOpen}
Expand All @@ -260,7 +259,6 @@ export const Toggletip = forwardRef<HTMLDialogElement, ToggletipProps>(
aria-labelledby={headline ? headlineId : bodyId}
aria-describedby={headline ? bodyId : undefined}
className={clsx(classes.base, className)}
// @ts-expect-error z-index can be a string
style={{
...style,
...dialogStyles,
Expand Down Expand Up @@ -314,7 +312,6 @@ export const Toggletip = forwardRef<HTMLDialogElement, ToggletipProps>(
<div
className={classes.backdrop}
style={{
// @ts-expect-error z-index can be a string
zIndex: `calc(${zIndex?.toString() || 'var(--cui-z-index-modal)'} - 1)`,
}}
/>
Expand Down
2 changes: 2 additions & 0 deletions templates/nextjs/template/app/preload-resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import ReactDOM from 'react-dom';

export function PreloadResources() {
// @ts-expect-error This API is available in the React canary used by Next.js
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
ReactDOM.preload(
'https://static.sumup.com/fonts/Inter/Inter-normal-latin.woff2',
{ as: 'font' },
Expand Down

0 comments on commit f1546d7

Please sign in to comment.