mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-15 18:13:40 +03: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 (
|
||||
<div className={staticClasses.Title} style={titleStyles}>
|
||||
<Focusable className={staticClasses.Title} style={titleStyles}>
|
||||
<DialogButton
|
||||
style={{ height: '28px', width: '40px', minWidth: 0, padding: '10px 12px' }}
|
||||
onClick={closeActivePlugin}
|
||||
>
|
||||
<FaArrowLeft style={{ marginTop: '-4px', display: 'block' }} />
|
||||
</DialogButton>
|
||||
<div style={{ flex: 0.9 }}>{activePlugin.name}</div>
|
||||
</div>
|
||||
{activePlugin?.titleView || <div style={{ flex: 0.9 }}>{activePlugin.name}</div>}
|
||||
</Focusable>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ export interface Plugin {
|
||||
content?: JSX.Element;
|
||||
onDismount?(): void;
|
||||
alwaysRender?: boolean;
|
||||
titleView?: JSX.Element;
|
||||
}
|
||||
|
||||
export enum InstallType {
|
||||
|
||||
Reference in New Issue
Block a user