mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 07:26:19 +00:00
wired ui: add source selector support
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user