Skip to content

Commit

Permalink
refactor: ref 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
SunwooJaeho committed Dec 10, 2024
1 parent fdcc627 commit 459b6cf
Showing 1 changed file with 9 additions and 37 deletions.
46 changes: 9 additions & 37 deletions packages/design-system/src/components/breadcrumb/breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,61 +5,33 @@ import { cn } from '../../utils';
import * as styles from './breadcrumb.css';

export default function Breadcrumb({
ref,
...props
}: React.ComponentPropsWithoutRef<'nav'> & { ref?: React.Ref<HTMLElement> }) {
return <nav ref={ref} aria-label="breadcrumb" {...props} />;
}: React.ComponentPropsWithoutRef<'nav'>) {
return <nav aria-label="breadcrumb" {...props} />;
}

function List({
ref,
className,
...props
}: React.ComponentPropsWithoutRef<'ol'> & {
ref?: React.Ref<HTMLOListElement>;
}) {
return (
<ol ref={ref} className={cn(styles.breadcrumbList, className)} {...props} />
);
function List({ className, ...props }: React.ComponentPropsWithoutRef<'ol'>) {
return <ol className={cn(styles.breadcrumbList, className)} {...props} />;
}

function Item({
ref,
className,
...props
}: React.ComponentPropsWithoutRef<'li'> & { ref?: React.Ref<HTMLLIElement> }) {
return (
<li ref={ref} className={cn(styles.breadcrumbItem, className)} {...props} />
);
function Item({ className, ...props }: React.ComponentPropsWithoutRef<'li'>) {
return <li className={cn(styles.breadcrumbItem, className)} {...props} />;
}

function Link({
ref,
className,
...props
}: React.ComponentPropsWithoutRef<'a'> & {
ref?: React.Ref<HTMLAnchorElement>;
isLast?: boolean;
}) {
return (
<a ref={ref} className={cn(styles.breadcrumbLink, className)} {...props} />
);
return <a className={cn(styles.breadcrumbLink, className)} {...props} />;
}

function Page({
ref,
className,
...props
}: React.ComponentPropsWithoutRef<'span'> & {
ref?: React.Ref<HTMLSpanElement>;
}) {
return (
<span
ref={ref}
className={cn(styles.breadcrumbPage, className)}
{...props}
/>
);
}: React.ComponentPropsWithoutRef<'span'> & {}) {
return <span className={cn(styles.breadcrumbPage, className)} {...props} />;
}

function Separator({
Expand Down

0 comments on commit 459b6cf

Please sign in to comment.