-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
304 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@import "styles/_variables.scss"; | ||
|
||
.container { | ||
background: white; | ||
max-width: 300px; | ||
box-shadow: 0px 11px 15px 0px #00000033; | ||
border-radius: 2.5%; | ||
} | ||
|
||
.container > * + * { | ||
border-top: 1px solid $equinor_MEDIUM_GRAY; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ReactNode } from "react"; | ||
import { NodeToolbar, Position } from "reactflow"; | ||
import styles from "./NodeTooltip.module.scss"; | ||
|
||
type NodeTooltip = { | ||
children: ReactNode; | ||
isVisible?: boolean; | ||
position?: Position; | ||
}; | ||
|
||
export const NodeTooltip = ({ children, isVisible, position }: NodeTooltip) => { | ||
return ( | ||
<NodeToolbar | ||
position={position} | ||
isVisible={isVisible} | ||
className={styles.container} | ||
> | ||
{children} | ||
</NodeToolbar> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.container { | ||
padding: 10px 20px; | ||
overflow: hidden; | ||
white-space: pre-wrap; | ||
overflow-wrap: break-word; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Typography } from "@equinor/eds-core-react"; | ||
import styles from "./NodeTooltipSection.module.scss"; | ||
import { formatNodeText } from "./utils/formatNodeText"; | ||
|
||
type NodeTooltipSection = { | ||
header?: string; | ||
text: string; | ||
}; | ||
|
||
export const NodeTooltipSection = ({ header, text }: NodeTooltipSection) => ( | ||
<div className={styles.container}> | ||
<Typography variant="meta" color="Gray"> | ||
{formatNodeText(header)} | ||
</Typography> | ||
<Typography variant="body_long">{formatNodeText(text)}</Typography> | ||
</div> | ||
); |
Oops, something went wrong.