From 5f002b976a69e8298ac47605718443178fb11003 Mon Sep 17 00:00:00 2001 From: Tobias Barsnes Date: Tue, 30 Apr 2024 08:44:24 +0200 Subject: [PATCH] chore: Remove `OverridableComponent` type (#1913) --- .../react/src/types/OverridableComponent.ts | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 packages/react/src/types/OverridableComponent.ts diff --git a/packages/react/src/types/OverridableComponent.ts b/packages/react/src/types/OverridableComponent.ts deleted file mode 100644 index 558a8bb3d5..0000000000 --- a/packages/react/src/types/OverridableComponent.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { - RefAttributes, - FC, - ElementType, - ComponentPropsWithRef, -} from 'react'; - -export type OverridableComponent< - ComponentProps, - Element extends HTMLElement, -> = { - (props: ComponentProps & RefAttributes): ReturnType; - - ( - props: { - /** Override html element - * @deprecated Will be removed in favor of `asChild` - * @see [Github Issue](https://github.com/digdir/designsystemet/issues/1124) - */ - as?: As; - } & ComponentProps & - Omit, keyof ComponentProps>, - ): ReturnType; -} & Pick;