Skip to content

Commit d0bddfd

Browse files
committed
chore: cleanup
1 parent f2f2aca commit d0bddfd

File tree

6 files changed

+18
-344
lines changed

6 files changed

+18
-344
lines changed

src/components/BentoGrid/ComponentCard/ComponentCard.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ export const ComponentCard: React.FC<GenericHintProps & {
2626
expanded = false,
2727
}) => {
2828
const { t } = useTranslation();
29-
30-
// Calculate segments and state using the provided calculator
3129
const hintState = config.calculateSegments(allItems, isLoading || false, error, enabled, t);
3230

3331
return (
@@ -56,9 +54,7 @@ export const ComponentCard: React.FC<GenericHintProps & {
5654
[styles.clickable]: !!onClick && enabled,
5755
})}
5856
onClick={enabled ? onClick : undefined}
59-
6057
>
61-
{/* Disabled overlay */}
6258
{!enabled && <div className={styles.disabledOverlay} />}
6359

6460
{/* Expand/Collapse button */}
@@ -67,7 +63,7 @@ export const ComponentCard: React.FC<GenericHintProps & {
6763
icon={expanded ? "sap-icon://collapse" : "sap-icon://expand"}
6864
design="Transparent"
6965
tooltip={expanded ? "Collapse to overview" : "Expand details"}
70-
style={{ zIndex: 1 }} /* Lower z-index */
66+
style={{ zIndex: 1 }}
7167
className={size === 'small' ? styles.expandButtonSmall : styles.expandButton}
7268
onClick={(e) => {
7369
e.stopPropagation();
@@ -88,6 +84,7 @@ export const ComponentCard: React.FC<GenericHintProps & {
8884
segments={hintState.segments}
8985
className={styles.progressBar}
9086
showOnlyNonZero={hintState.showOnlyNonZero ?? true}
87+
isHealthy={hintState.isHealthy}
9188
barWidth={
9289
size === 'small' ? '80%' :
9390
size === 'medium' ? '85%' :
@@ -113,15 +110,11 @@ export const ComponentCard: React.FC<GenericHintProps & {
113110
duration: size === 'medium' ? 0 : 400,
114111
staggerDelay: size === 'medium' ? 0 : 100,
115112
}}
116-
// Legacy props for backward compatibility
117-
label={hintState.label}
118-
showPercentage={hintState.showPercentage}
119-
isHealthy={hintState.isHealthy}
120113
showSegmentLabels={hintState.label?.includes('Roles')}
121114
minSegmentWidthForLabel={12}
122115
/>
123116

124-
{/* Second progress bar only for large and extra-large cards */}
117+
{/* Secondary chart for large and extra-large cards */}
125118
{(size === 'large' || size === 'extra-large') && secondarySegments && (
126119
<MultiPercentageBar
127120
segments={secondarySegments}

src/components/BentoGrid/ComponentCardHoverContent/CardHoverContent.module.css

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/components/BentoGrid/ComponentCardHoverContent/CardHoverContent.tsx

Lines changed: 0 additions & 129 deletions
This file was deleted.

src/components/BentoGrid/ComponentCardHoverContent/hoverCalculations.ts

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)