Skip to content

Commit 1b2140b

Browse files
committed
finished styling history tab
1 parent 22fd64f commit 1b2140b

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,6 @@ export default function ComponentMap({
260260
<svg ref={containerRef} width={totalWidth} height={totalHeight + 0}>
261261
<LinearGradient id='root-gradient' from='#488689' to='#3c6e71' />
262262
<LinearGradient id='parent-gradient' from='#488689' to='#3c6e71' />
263-
<rect
264-
className='componentMapContainer'
265-
onClick={() => {
266-
hideTooltip();
267-
}}
268-
width={sizeWidth / aspect}
269-
height={sizeHeight / aspect + 0}
270-
rx={14}
271-
/>
272263
<Group transform={`scale(${aspect})`} top={margin.top} left={margin.left}>
273264
<Tree
274265
root={hierarchy(startNode, (d) => (d.isExpanded ? d.children : null))}

src/app/components/StateRoute/History.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ const defaultMargin: DefaultMargin = {
2121
};
2222

2323
// Fixed node separation distances
24-
const FIXED_NODE_HEIGHT = 200; // Vertical distance between nodes
25-
const FIXED_NODE_WIDTH = 220; // Horizontal distance between nodes
24+
const FIXED_NODE_HEIGHT = 150; // Vertical distance between nodes
25+
const FIXED_NODE_WIDTH = 200; // Horizontal distance between nodes
2626

2727
// main function exported to StateRoute
2828
// below we destructure the props
@@ -214,7 +214,7 @@ function History(props: Record<string, unknown>): JSX.Element {
214214
.append('rect')
215215
.attr('width', 200)
216216
.attr('height', 120)
217-
.attr('x', -90)
217+
.attr('x', -100)
218218
.attr('y', -40)
219219
.attr('rx', 8)
220220
.attr('ry', 8);
@@ -237,7 +237,7 @@ function History(props: Record<string, unknown>): JSX.Element {
237237
.append('xhtml:div')
238238
.style('font-size', '12px')
239239
.style('text-align', 'left')
240-
.style('padding-left', '12px')
240+
.style('padding-left', '8px')
241241
.html((d) => findDiff(d.data.index));
242242

243243
return svg.node();

src/app/styles/components/_componentMap.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.componentMapContainer {
33
fill: #f9fafb;
44
transition: all 0.3s ease;
5+
overflow: auto;
56
}
67
.componentMapContainer svg {
78
background-color: #f9fafb;

0 commit comments

Comments
 (0)