Skip to content

Commit 52eb836

Browse files
committed
icon color
1 parent 3081c89 commit 52eb836

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

packages/compass-data-modeling/src/components/drawer/relationships-section.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ import {
44
Badge,
55
Button,
66
css,
7+
cx,
78
Icon,
89
IconButton,
910
palette,
1011
spacing,
1112
Tooltip,
13+
useDarkMode,
1214
} from '@mongodb-js/compass-components';
1315
import type { Relationship } from '../../services/data-model-storage';
1416
import { getDefaultRelationshipName } from '../../utils';
@@ -54,6 +56,11 @@ const relationshipNameStyles = css({
5456

5557
const warnIconWrapperStyles = css({
5658
display: 'flex',
59+
color: palette.yellow.dark2,
60+
});
61+
62+
const warnIconWrapperDarkStyles = css({
63+
color: palette.yellow.light2,
5764
});
5865

5966
const relationshipContentStyles = css({
@@ -77,6 +84,7 @@ export const RelationshipsSection: React.FunctionComponent<
7784
onEditRelationshipClick,
7885
onDeleteRelationshipClick,
7986
}) => {
87+
const darkmode = useDarkMode();
8088
return (
8189
<DMDrawerSection
8290
label={
@@ -119,11 +127,13 @@ export const RelationshipsSection: React.FunctionComponent<
119127
{isRelationshipInvalid(r) && (
120128
<Tooltip
121129
trigger={
122-
<div className={warnIconWrapperStyles}>
123-
<Icon
124-
glyph="Warning"
125-
color={palette.yellow.light2}
126-
/>
130+
<div
131+
className={cx(
132+
warnIconWrapperStyles,
133+
darkmode && warnIconWrapperDarkStyles
134+
)}
135+
>
136+
<Icon glyph="Warning" />
127137
</div>
128138
}
129139
>

0 commit comments

Comments
 (0)