ui-next: add sample plugin

This commit is contained in:
Baoshuo committed 2026-05-10 01:12:47 +08:00
1 parent ad49272dca
commit 504b9639b5
4 files changed
+17 -10

No files matched your search

@@ -0,0 +1,6 @@
{
"name": "@hydrooj/ui-next-plugin-sample",
"dependencies": {
"@hydrooj/ui-next": "workspace:*"
}
}
@@ -0,0 +1,4 @@
export default function BeforeComponent() {
console.log('before app');
return <div>before app via @hydrooj/ui-next-plugin-sample</div>;
}
@@ -0,0 +1,6 @@
import type { PluginAPI } from '@hydrooj/ui-next';
import BeforeComponent from './before';
export function setup(api: PluginAPI) {
api.before('page:app', BeforeComponent);
}