mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-17 08:47:49 +00:00
Add Custom TitleView (#512)
* feat(titleView): Add Custom TitleView support * fix: wrap TitleView in Focusable * fix: remove root div on TitleView
This commit is contained in:
@@ -49,15 +49,15 @@ const TitleView: VFC = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={staticClasses.Title} style={titleStyles}>
|
<Focusable className={staticClasses.Title} style={titleStyles}>
|
||||||
<DialogButton
|
<DialogButton
|
||||||
style={{ height: '28px', width: '40px', minWidth: 0, padding: '10px 12px' }}
|
style={{ height: '28px', width: '40px', minWidth: 0, padding: '10px 12px' }}
|
||||||
onClick={closeActivePlugin}
|
onClick={closeActivePlugin}
|
||||||
>
|
>
|
||||||
<FaArrowLeft style={{ marginTop: '-4px', display: 'block' }} />
|
<FaArrowLeft style={{ marginTop: '-4px', display: 'block' }} />
|
||||||
</DialogButton>
|
</DialogButton>
|
||||||
<div style={{ flex: 0.9 }}>{activePlugin.name}</div>
|
{activePlugin?.titleView || <div style={{ flex: 0.9 }}>{activePlugin.name}</div>}
|
||||||
</div>
|
</Focusable>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ export interface Plugin {
|
|||||||
content?: JSX.Element;
|
content?: JSX.Element;
|
||||||
onDismount?(): void;
|
onDismount?(): void;
|
||||||
alwaysRender?: boolean;
|
alwaysRender?: boolean;
|
||||||
|
titleView?: JSX.Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum InstallType {
|
export enum InstallType {
|
||||||
|
|||||||
Reference in New Issue
Block a user