chore(examples): lint

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-04-11 20:30:23 +02:00
parent 4454867c36
commit 544fd05d3e
3 changed files with 21 additions and 7 deletions
+15 -5
View File
@@ -120,16 +120,26 @@ const initialElements: Elements = [
const snapGrid: SnapGrid = [16, 16]
function nodeStrokeColor(n: Node): string {
if ((n.style as Styles)?.background) return (n.style as Styles).background as string
if (n.type === 'input') return '#0041d0'
if (n.type === 'output') return '#ff0072'
if (n.type === 'default') return '#1a192b'
if ((n.style as Styles)?.background) {
return (n.style as Styles).background as string
}
if (n.type === 'input') {
return '#0041d0'
}
if (n.type === 'output') {
return '#ff0072'
}
if (n.type === 'default') {
return '#1a192b'
}
return '#eee'
}
function nodeColor(n: Node): string {
if ((n.style as Styles)?.background) return (n.style as Styles).background as string
if ((n.style as Styles)?.background) {
return (n.style as Styles).background as string
}
return '#fff'
}