Skip to content

Commit

Permalink
Smaller tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Apr 6, 2022
1 parent 2ae4e73 commit 399a3b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ const MiddleComparativeView = observer(
<Header ExtraButtons={ExtraButtons} model={model} />
<RubberBand
model={model}
ControlComponent={
<div style={{ background: '#ccc', width: '100%', height: 20 }} />
}
ControlComponent={<div style={{ width: '100%', height: 15 }} />}
/>
<div className={classes.container}>
<ReactComponent model={views[0]} />
Expand Down Expand Up @@ -106,9 +104,7 @@ const OverlayComparativeView = observer(
<Header model={model} ExtraButtons={ExtraButtons} />
<RubberBand
model={model}
ControlComponent={
<div style={{ background: '#ccc', width: '100%', height: 20 }} />
}
ControlComponent={<div style={{ width: '100%', height: 15 }} />}
/>

<div className={classes.container}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ const useStyles = makeStyles(theme => {
position: 'absolute',
zIndex: 10,
},
sm: {
fontSize: 10,
},
}
})

Expand All @@ -63,9 +66,13 @@ const VerticalGuide = observer(
<Tooltip
open
placement="top"
title={model.views.map(view => (
<Typography>{stringify(view.pxToBp(coordX))}</Typography>
))}
title={model.views
.map(view => view.pxToBp(coordX))
.map(elt => (
<Typography className={classes.sm} key={JSON.stringify(elt)}>
{stringify(elt)}
</Typography>
))}
arrow
>
<div
Expand Down

0 comments on commit 399a3b3

Please sign in to comment.