style: [items] StatCards 6개 이상일 때 한 행에 모두 표시
- count >= 6일 때 md:grid-cols-6 적용 - 품목관리 화면에서 6개 카드가 한 행에 표시되도록 개선
This commit is contained in:
@@ -24,9 +24,11 @@ interface StatCardsProps {
|
||||
export function StatCards({ stats }: StatCardsProps) {
|
||||
const count = stats.length;
|
||||
const gridClass =
|
||||
count >= 5
|
||||
? 'grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 gap-2'
|
||||
: 'grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2';
|
||||
count >= 6
|
||||
? 'grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-2'
|
||||
: count >= 5
|
||||
? 'grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 gap-2'
|
||||
: 'grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2';
|
||||
|
||||
return (
|
||||
<div className={gridClass}>
|
||||
|
||||
Reference in New Issue
Block a user