wired ui: add source selector support

This commit is contained in:
Lorenzune
2026-03-15 19:02:34 +01:00
parent bdae069003
commit ba0208c654
37 changed files with 1095 additions and 104 deletions
@@ -1,4 +1,4 @@
import { FC, PropsWithChildren } from 'react';
import { FC, PropsWithChildren, ReactNode } from 'react';
import { WiredFurniType } from '../../../../api';
import { WiredBaseView } from '../WiredBaseView';
@@ -7,16 +7,17 @@ export interface WiredConditionBaseViewProps
hasSpecialInput: boolean;
requiresFurni: number;
save: () => void;
footer?: ReactNode;
}
export const WiredConditionBaseView: FC<PropsWithChildren<WiredConditionBaseViewProps>> = props =>
{
const { requiresFurni = WiredFurniType.STUFF_SELECTION_OPTION_NONE, save = null, hasSpecialInput = false, children = null } = props;
const { requiresFurni = WiredFurniType.STUFF_SELECTION_OPTION_NONE, save = null, hasSpecialInput = false, children = null, footer = null } = props;
const onSave = () => (save && save());
return (
<WiredBaseView hasSpecialInput={ hasSpecialInput } requiresFurni={ requiresFurni } save={ onSave } wiredType="condition">
<WiredBaseView hasSpecialInput={ hasSpecialInput } requiresFurni={ requiresFurni } save={ onSave } wiredType="condition" footer={ footer }>
{ children }
</WiredBaseView>
);