Skip to content

Commit 6143ca0

Browse files
committed
refactor: replace interface with type
1 parent 8da6676 commit 6143ca0

18 files changed

+25
-25
lines changed

resources/js/components/app-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { SidebarInset } from '@/components/ui/sidebar';
22
import * as React from 'react';
33

4-
interface AppContentProps extends React.ComponentProps<'div'> {
4+
type AppContentProps = React.ComponentProps<'div'> & {
55
variant?: 'header' | 'sidebar';
66
}
77

resources/js/components/app-header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const rightNavItems: NavItem[] = [
3838

3939
const activeItemStyles = 'text-neutral-900 dark:bg-neutral-800 dark:text-neutral-100';
4040

41-
interface AppHeaderProps {
41+
type AppHeaderProps = {
4242
breadcrumbs?: BreadcrumbItem[];
4343
}
4444

resources/js/components/app-shell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { SidebarProvider } from '@/components/ui/sidebar';
22
import { useState } from 'react';
33

4-
interface AppShellProps {
4+
type AppShellProps = {
55
children: React.ReactNode;
66
variant?: 'header' | 'sidebar';
77
}

resources/js/components/icon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { cn } from '@/lib/utils';
22
import { type LucideProps } from 'lucide-react';
33

4-
interface IconProps extends Omit<LucideProps, 'ref'> {
4+
type IconProps = Omit<LucideProps, 'ref'> & {
55
iconNode: React.ComponentType<LucideProps>;
66
}
77

resources/js/components/ui/badge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const badgeVariants = cva(
2020
},
2121
);
2222

23-
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
23+
export type BadgeProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof badgeVariants>;
2424

2525
function Badge({ className, variant, ...props }: BadgeProps) {
2626
return <div className={cn(badgeVariants({ variant }), className)} {...props} />;

resources/js/components/ui/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const buttonVariants = cva(
3030
},
3131
);
3232

33-
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
33+
export type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonVariants> & {
3434
asChild?: boolean;
3535
}
3636

resources/js/components/ui/icon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { LucideIcon } from 'lucide-react';
22

3-
interface IconProps {
3+
type IconProps = {
44
iconNode?: LucideIcon | null;
55
className?: string;
66
}

resources/js/components/ui/placeholder-pattern.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useId } from 'react';
22

3-
interface PlaceholderPatternProps {
3+
type PlaceholderPatternProps = {
44
className?: string;
55
}
66

resources/js/components/ui/sheet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const sheetVariants = cva(
4646
},
4747
);
4848

49-
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {}
49+
type SheetContentProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> & VariantProps<typeof sheetVariants>
5050

5151
const SheetContent = React.forwardRef<React.ElementRef<typeof SheetPrimitive.Content>, SheetContentProps>(
5252
({ side = 'right', className, children, ...props }, ref) => (

resources/js/components/user-menu-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { type User } from '@/types';
55
import { Link } from '@inertiajs/react';
66
import { LogOut, Settings } from 'lucide-react';
77

8-
interface UserMenuContentProps {
8+
type UserMenuContentProps = {
99
user: User;
1010
}
1111

0 commit comments

Comments
 (0)