mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
25 lines
831 B
TypeScript
25 lines
831 B
TypeScript
import { FC, PropsWithChildren, ReactNode } from 'react';
|
|
import { WiredFurniType } from '../../../../api';
|
|
import { WiredBaseView } from '../WiredBaseView';
|
|
|
|
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, footer = null } = props;
|
|
|
|
const onSave = () => (save && save());
|
|
|
|
return (
|
|
<WiredBaseView hasSpecialInput={ hasSpecialInput } requiresFurni={ requiresFurni } save={ onSave } wiredType="condition" footer={ footer }>
|
|
{ children }
|
|
</WiredBaseView>
|
|
);
|
|
};
|