plugin icons and titles

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-02-09 23:02:34 +01:00
parent 4b996d05d3
commit e1f22f2d15
31 changed files with 1362 additions and 89 deletions
+56
View File
@@ -907,6 +907,62 @@ const appPlugin: OverridableFrontendPlugin<
: never;
}>;
}>;
'component:app/core-page-layout': OverridableExtensionDefinition<{
kind: 'component';
name: 'core-page-layout';
config: {};
configInput: {};
output: ExtensionDataRef<
{
ref: SwappableComponentRef;
loader:
| (() => (props: {}) => JSX.Element | null)
| (() => Promise<(props: {}) => JSX.Element | null>);
},
'core.swappableComponent',
{}
>;
inputs: {};
params: <Ref extends SwappableComponentRef<any>>(params: {
component: Ref extends SwappableComponentRef<
any,
infer IExternalComponentProps
>
? {
ref: Ref;
} & ((props: IExternalComponentProps) => JSX.Element | null)
: never;
loader: Ref extends SwappableComponentRef<
infer IInnerComponentProps,
any
>
?
| (() => (props: IInnerComponentProps) => JSX.Element | null)
| (() => Promise<
(props: IInnerComponentProps) => JSX.Element | null
>)
: never;
}) => ExtensionBlueprintParams<{
component: Ref extends SwappableComponentRef<
any,
infer IExternalComponentProps
>
? {
ref: Ref;
} & ((props: IExternalComponentProps) => JSX.Element | null)
: never;
loader: Ref extends SwappableComponentRef<
infer IInnerComponentProps,
any
>
?
| (() => (props: IInnerComponentProps) => JSX.Element | null)
| (() => Promise<
(props: IInnerComponentProps) => JSX.Element | null
>)
: never;
}>;
}>;
'component:app/core-progress': OverridableExtensionDefinition<{
kind: 'component';
name: 'core-progress';
+2 -2
View File
@@ -73,10 +73,10 @@ export const PageLayout = SwappableComponentBlueprint.make({
define({
component: SwappablePageLayout,
loader: () => (props: PageLayoutProps) => {
const { title, tabs, children } = props;
const { title, icon: Icon, tabs, children } = props;
return (
<Flex direction="column" style={{ flexGrow: 1, minHeight: 0 }}>
<Header title={title} tabs={tabs} />
<Header title={title} icon={Icon && <Icon />} tabs={tabs} />
<Flex direction="column" style={{ flexGrow: 1, minHeight: 0 }}>
{children}
</Flex>