-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: backwards compatible content helpers
- Loading branch information
1 parent
532cee3
commit 3873526
Showing
6 changed files
with
64 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
import { usePanel } from "./panel"; | ||
|
||
/** | ||
* Returns Kirby's Panel API. | ||
* | ||
* @remarks | ||
* This composable is a simple shortcut to `window.panel.api`. | ||
*/ | ||
export function useApi() { | ||
return usePanel().api; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
import { usePanel } from "./panel"; | ||
|
||
/** | ||
* Returns the Panel Vue instance. | ||
* | ||
* @remarks | ||
* This composable is a simple shortcut to `window.panel.app`. | ||
*/ | ||
export function useApp() { | ||
return usePanel().app; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
import type { Panel } from "../types/panel"; | ||
|
||
/** | ||
* Returns the reactive Kirby Panel object. | ||
* | ||
* @remarks | ||
* This composable is a simple shortcut to `window.panel`. | ||
*/ | ||
export function usePanel(): Panel { | ||
return window.panel; | ||
} |
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