Skip to content

Commit 6c50182

Browse files
committed
fix
1 parent 469f024 commit 6c50182

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

src/components/Ui/Infobox/Infobox.module.css

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,34 @@
1-
.infobox {
1+
.wrapper {
2+
width: 100%;
3+
background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.8), rgba(0, 0, 2055, 0.2)) border-box;
4+
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
25
box-sizing: border-box;
6+
padding: 2px;
7+
margin-bottom: 2rem;
8+
border-radius: 15px;
9+
}
10+
11+
.wrapper.dark-mode {
12+
background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2))
13+
border-box;
14+
}
15+
16+
.infobox {
17+
padding: 3px;
318
display: flex;
419
align-items: center;
520
border-radius: 12px;
621
padding: 1rem;
722
margin: 0;
8-
margin-bottom: 2rem;
9-
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
1023
overflow: hidden;
11-
border: 3px solid rgba(255, 0, 0, 0.5);
1224
}
1325

1426
.icon {
1527
flex-shrink: 0;
1628
width: 1.5rem;
1729
height: 1.5rem;
1830
color: var(--sapBackgroundColor);
19-
margin-right: 1rem;
31+
margin-right: 0.75rem;
2032
}
2133

2234
.content {

src/components/Ui/Infobox/Infobox.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Icon } from '@ui5/webcomponents-react';
44

55
import styles from './Infobox.module.css';
66
import { useTheme } from '../../../hooks/useTheme';
7-
import FadeVisibility from '../FadeVisibility/FadeVisibility';
87

98
interface LabelProps {
109
id?: string;
@@ -44,17 +43,18 @@ export const Infobox: React.FC<LabelProps> = ({
4443
[styles['variant-warning']]: variant === 'warning',
4544
[styles['variant-danger']]: variant === 'danger',
4645
[styles['full-width']]: fullWidth,
47-
[styles['dark-mode']]: isDarkTheme,
4846
},
4947
className,
5048
);
5149

5250
const iconName = icon || variantIcons[variant];
5351

5452
return (
55-
<div className={infoboxClasses} id={id}>
56-
{iconName && <Icon name={iconName} className={styles.icon} />}
57-
<div className={styles.content}>{children}</div>
53+
<div className={cx(styles['wrapper'], { [styles['dark-mode']]: isDarkTheme })}>
54+
<div className={infoboxClasses} id={id}>
55+
{iconName && <Icon name={iconName} className={styles.icon} />}
56+
<div className={styles.content}>{children}</div>
57+
</div>
5858
</div>
5959
);
6060
};

0 commit comments

Comments
 (0)