feat(edges): export BaseEdgeProps

This commit is contained in:
bcakmakoglu
2022-06-07 23:27:19 +02:00
committed by Braks
parent fdc6f40c3c
commit ac9389480d
3 changed files with 13 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
import type { CSSProperties, FunctionalComponent } from 'vue'
import EdgeText from './EdgeText.vue'
interface Props {
export interface BaseEdgeProps {
centerX: number
centerY: number
path: string
@@ -20,7 +20,7 @@ interface Props {
* The base edge is a simple wrapper for svg path
* You can use the base edge in your custom edges and just pass down the necessary props
*/
const BaseEdge: FunctionalComponent<Props> = function ({
const BaseEdge: FunctionalComponent<BaseEdgeProps> = function ({
path,
centerX,
centerY,

View File

@@ -1,4 +1,4 @@
export { default as BaseEdge } from './BaseEdge'
export { default as BaseEdge, BaseEdgeProps } from './BaseEdge'
export { default as BezierEdge } from './BezierEdge'
export { default as SimpleBezierEdge } from './SimpleBezierEdge'
export { default as StepEdge } from './StepEdge'

View File

@@ -2,7 +2,16 @@ export { default as VueFlow } from './container/VueFlow/VueFlow.vue'
export { default as Handle } from './components/Handle/Handle.vue'
export { StraightEdge, StepEdge, BezierEdge, SimpleBezierEdge, SmoothStepEdge, BaseEdge, EdgeText } from './components/Edges'
export {
StraightEdge,
StepEdge,
BezierEdge,
SimpleBezierEdge,
SmoothStepEdge,
BaseEdge,
BaseEdgeProps,
EdgeText,
} from './components/Edges'
export {
getBezierPath,