Class TJSSettingsSwap
Hierarchy
- SvelteComponent<
{
options?: TJSGameSettingsWithUI.Options.Create;
settings?: TJSGameSettingsWithUI;
},
{ [evt: string]: CustomEvent<any> },
{
default: {};
"settings-footer": {
options: TJSGameSettingsWithUI.Options.Create;
settings: TJSGameSettingsWithUI;
slot: string;
uiSettings: any;
};
"settings-header": {
options: TJSGameSettingsWithUI.Options.Create;
settings: TJSGameSettingsWithUI;
slot: string;
uiSettings: any;
};
},
>- TJSSettingsSwap (View Summary)
Indexable
-
[prop: string]: any
Constructors
constructor
-
new TJSSettingsSwap(
options: ComponentConstructorOptions<
{
options?: TJSGameSettingsWithUI.Options.Create;
settings?: TJSGameSettingsWithUI;
},
>,
): TJSSettingsSwapParameters
- options: ComponentConstructorOptions<
{
options?: TJSGameSettingsWithUI.Options.Create;
settings?: TJSGameSettingsWithUI;
},
>
Returns TJSSettingsSwap
- options: ComponentConstructorOptions<
Methods
$destroy
-
Returns void
$on
-
Type Parameters
- K extends string
Parameters
- type: K
- callback: (e: CustomEvent<any>) => void
Returns () => void
TJSSettingsSwapprovides a convenience component to swap a main slotted component withTJSSettingsEdit.The component props are the same and documented in TJSSettingsEdit. The only difference is that to support slot forwarding for
TJSSettingsEditis that you define thesettings-headerandsettings-footerslots inside theTJSSettingsSwapcontent.Controlling the swap state is accessible from
TJSGameSettingsWithUI.uiControl.showSettingsaccessor (get or set). This allows for instance the creation of an app header button to swap between the main slotted component andTJSSettingsEdit.