Add PerformerSelect as loadable component (#5528)

* Add PerformerSelect to loadable components
* Add PerformerSelect to example plugin
This commit is contained in:
WithoutPants
2024-12-04 14:15:32 +11:00
committed by GitHub
parent 8c8be22fe4
commit cacfe5a268
2 changed files with 10 additions and 1 deletions

View File

@@ -145,11 +145,16 @@ interface IPluginApi {
});
const TestPage: React.FC = () => {
const componentsLoading = PluginApi.hooks.useLoadComponents([PluginApi.loadableComponents.SceneCard]);
const componentsToLoad = [
PluginApi.loadableComponents.SceneCard,
PluginApi.loadableComponents.PerformerSelect,
];
const componentsLoading = PluginApi.hooks.useLoadComponents(componentsToLoad);
const {
SceneCard,
LoadingIndicator,
PerformerSelect,
} = PluginApi.components;
// read a random scene and show a scene card for it
@@ -172,6 +177,9 @@ interface IPluginApi {
<div>
<div>This is a test page.</div>
{!!scene && <SceneCard scene={data.findScenes.scenes[0]} />}
<div>
<PerformerSelect isMulti onSelect={() => {}} values={[]} />
</div>
</div>
);
};