upd: tampilan
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user