upd: tampilan

This commit is contained in:
2026-04-04 10:04:10 +08:00
parent 416c623bec
commit a245225aca
6 changed files with 69 additions and 22 deletions

View File

@@ -16,6 +16,8 @@ interface SummaryCardProps {
label: string
}
isError?: boolean
onClick?: () => void
children?: React.ReactNode
}
export function SummaryCard({
@@ -25,7 +27,9 @@ export function SummaryCard({
color = 'brand-blue',
trend,
progress,
isError
isError,
onClick,
children
}: SummaryCardProps) {
const scheme = useComputedColorScheme('light', { getInitialValueInEffect: true })
@@ -35,6 +39,8 @@ export function SummaryCard({
padding="xl"
radius="2xl"
className="glass"
onClick={onClick}
style={{ cursor: onClick ? 'pointer' : 'default' }}
styles={(theme) => ({
root: {
backgroundColor: isError && Number(value) > 0
@@ -95,6 +101,8 @@ export function SummaryCard({
/>
</Box>
)}
{children}
</Card>
)
}