Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
don't set breakpoints on source code but only the margin
Browse files Browse the repository at this point in the history
  • Loading branch information
eggplantzzz committed Jun 27, 2023
1 parent 710ef85 commit 9c917e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ interface LineNumberProps {

const useStyles = createStyles(() => ({
lineNumber: {
display: "flex"
"&:hover": {
cursor: "pointer"
},
"display": "flex"
},
spacer: {
minHeight: 22,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createStyles } from "@mantine/core";
import { useDash } from "src/hooks";

const useStyles = createStyles((theme, _params, _getRef) => ({
lineNumber: {
Expand Down Expand Up @@ -33,20 +32,13 @@ function SourceLine({
sourceId
}: SourceLineProps): JSX.Element {
const { classes } = useStyles();
const {
operations: { toggleDebuggerBreakpoint }
} = useDash()!;

if (!lastLine) line += "\n";

const handleClick = () => {
toggleDebuggerBreakpoint({ line: lineNumber, sourceId });
};

const lineId = `${sourceId.slice(-10)}-${lineNumber}`;

return (
<div className={classes.sourceLine} onClick={handleClick}>
<div className={classes.sourceLine}>
<div
className={classes.content}
id={lineId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ const useStyles = createStyles(theme => ({
theme.colorScheme === "dark" ? theme.colors["truffle-brown"][8] : "white"
},
source: {
"&:hover": {
cursor: "pointer"
},
"paddingTop": 15,
"paddingLeft": 15
paddingTop: 15,
paddingLeft: 15
},
lineNumbersContainer: {
height: 22,
Expand Down

0 comments on commit 9c917e8

Please sign in to comment.