Skip to content

Commit e4419ec

Browse files
committed
finished styling tool tip display
1 parent 1e187c8 commit e4419ec

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

src/app/components/StateRoute/ComponentMap/ComponentMap.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,8 @@ export default function ComponentMap({
118118
minWidth: 60,
119119
maxWidth: 300,
120120
backgroundColor: 'rgb(15,15,15)',
121-
color: 'white',
122121
fontSize: '16px',
123122
lineHeight: '18px',
124-
fontFamily: 'Roboto',
125123
zIndex: 100,
126124
pointerEvents: 'all !important',
127125
};
@@ -160,6 +158,7 @@ export default function ComponentMap({
160158
}
161159
};
162160

161+
// check if any data should be displayed in tool tip display
163162
const hasDisplayableData = (nodeData) => {
164163
// Check if the node has props
165164
const hasProps =

src/app/styles/layout/_stateContainer.scss

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,28 +102,30 @@
102102
.tooltip-header {
103103
padding: 12px;
104104
background-color: #1f2937;
105-
border-bottom: 1px solid rgba(107, 114, 128, 0.2);
105+
border-radius: 8px;
106+
border: 1px solid rgba(255, 255, 255, 0.1);
106107
}
107108

108109
.tooltip-title {
109110
margin: 0;
110111
font-size: 16px;
111112
font-weight: 500;
112-
color: #f9fafb;
113+
color: #f3f4f6;
113114
}
114115

115116
.tooltip-container {
116117
width: 300px;
117118
background-color: #111827;
118119
border-radius: 8px;
119120
font-family: 'Outfit', sans-serif;
120-
color: #f9fafb;
121121
overflow: hidden;
122+
border: 1px solid rgba(255, 255, 255, 0.1);
122123
}
123124

124125
.tooltip-section {
125126
padding: 12px;
126127
border-bottom: 1px solid rgba(107, 114, 128, 0.2);
128+
transition: background-color 150ms ease;
127129
}
128130

129131
.tooltip-section:last-child {
@@ -179,3 +181,19 @@
179181
margin: 0 !important;
180182
padding-left: 16px !important;
181183
}
184+
185+
/* Animation for Tooltip Appearance */
186+
@keyframes tooltipFade {
187+
from {
188+
opacity: 0;
189+
transform: translateY(4px);
190+
}
191+
to {
192+
opacity: 1;
193+
transform: translateY(0);
194+
}
195+
}
196+
197+
.tooltip-container {
198+
animation: tooltipFade 150ms ease-out;
199+
}

0 commit comments

Comments
 (0)