Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): export PanelPositionType #1421

Merged
merged 4 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/curly-phones-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@vue-flow/controls": patch
"@vue-flow/minimap": patch
---

Allow `PanelPositionType` as value for position
5 changes: 5 additions & 0 deletions .changeset/six-trainers-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vue-flow/core": minor
---

Export `PanelPositionType`
4 changes: 2 additions & 2 deletions packages/controls/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FitViewParams, PanelPosition } from '@vue-flow/core'
import type { FitViewParams, PanelPosition, PanelPositionType } from '@vue-flow/core'

export interface ControlProps {
/** Show the zoom icon */
Expand All @@ -10,5 +10,5 @@ export interface ControlProps {
/** Params to use on fitView */
fitViewParams?: FitViewParams
/** Position of the controls {@link PanelPosition} */
position?: PanelPosition
position?: PanelPositionType | PanelPosition
}
2 changes: 1 addition & 1 deletion packages/core/src/types/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export enum PanelPosition {
BottomRight = 'bottom-right',
}

type PanelPositionType = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'
export type PanelPositionType = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'

export interface PanelProps {
position: PanelPosition | PanelPositionType
Expand Down
4 changes: 2 additions & 2 deletions packages/minimap/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dimensions, GraphNode, NodeMouseEvent, PanelPosition, XYPosition } from '@vue-flow/core'
import type { Dimensions, GraphNode, NodeMouseEvent, PanelPosition, PanelPositionType, XYPosition } from '@vue-flow/core'
import type { CSSProperties, InjectionKey } from 'vue'

/** expects a node and returns a color value */
Expand All @@ -24,7 +24,7 @@ export interface MiniMapProps {
/** Border width of minimap mask */
maskStrokeWidth?: number
/** Position of the minimap {@link PanelPosition} */
position?: PanelPosition
position?: PanelPositionType | PanelPosition
/** Enable drag minimap to drag viewport */
pannable?: boolean
/** Enable zoom minimap to zoom viewport */
Expand Down
Loading