Skip to content

Commit

Permalink
change edge type to be optional - defaults to dashed
Browse files Browse the repository at this point in the history
  • Loading branch information
kfirpeled committed Dec 18, 2024
1 parent a53b1b9 commit 0e08622
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,5 @@ export const edgeDataSchema = schema.object({
source: schema.string(),
target: schema.string(),
color: colorSchema,
type: schema.oneOf([schema.literal('solid'), schema.literal('dashed')]),
type: schema.maybe(schema.oneOf([schema.literal('solid'), schema.literal('dashed')])),
});
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function DefaultEdge({
stroke: euiTheme.colors[color],
}}
css={
data?.type === 'dashed' && {
(!data?.type || data?.type === 'dashed') && {
strokeDasharray: '2,2',
}
}
Expand Down

0 comments on commit 0e08622

Please sign in to comment.