children 안 넣는 경우도 나오도록 수정.

This commit is contained in:
truthwing
2025-04-24 14:40:53 +09:00
parent a4310ff090
commit 7e9fb08e97
@@ -13,7 +13,7 @@ type UiTableProps = {
onPageChange: (page: number) => void;
className?: string;
resetPageNo?: boolean;
children: React.ReactNode | undefined;
children?: React.ReactNode | undefined;
}
type UiHeadProps = {
@@ -52,9 +52,12 @@ export function UiTable({ tableData, headlist, pageSize, total, headName, childr
</div> : <></>}
<div className={`card !m-[1.2rem] !p-0r ${className}`}>
<Table variant="secondary">
{children?children:
<TableHeader className="font-bold">
{children ? children : <HeadMakeColSpan upHeadList={headlist} />}
</TableHeader>
}
<TableBody className='text-center'>
{tableData.length > 0 ? tableData?.map((el: { [key: string]: any}, index) => (
<TableRow key={`row-${index}`}>