Skip to content

Commit

Permalink
refactor: change twMerge -> cn
Browse files Browse the repository at this point in the history
  • Loading branch information
gahyuun committed Mar 12, 2024
1 parent c5af991 commit 0a9c473
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/ui/view/molecule/list/list-root.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { cn } from '@/app/utils/shadcn/utils';
import { ReactNode } from 'react';
import { twMerge } from 'tailwind-merge';

export interface ListRow {
id: number;
Expand All @@ -15,7 +15,7 @@ interface ListRootProps<T extends ListRow> {
export function ListRoot<T extends ListRow>({ data, render, isScrollList = false, emptyDataRender }: ListRootProps<T>) {
const hasNotData = emptyDataRender && data.length === 0;
return (
<div className={twMerge('rounded-xl border-[1px] border-gray-300 w-full ', isScrollList && 'h-72 overflow-auto')}>
<div className={cn('rounded-xl border-[1px] border-gray-300 w-full ', isScrollList && 'h-72 overflow-auto')}>
{data.map((item, index) => render(item, index))}
{hasNotData ? emptyDataRender() : null}
</div>
Expand Down

0 comments on commit 0a9c473

Please sign in to comment.