Class TJSSettingsSwap
Hierarchy
- SvelteComponent<TJSSettingsSwap.Props, TJSSettingsSwap.Events, TJSSettingsSwap.Slots>
- TJSSettingsSwap (view full)
Index
Constructors
Methods
Constructors
constructor
- new TJSSettings
Swap (options): TJSSettingsSwap Parameters
- options: ComponentConstructorOptions<TJSSettingsSwap.Props>
Returns TJSSettingsSwap
Methods
$destroy
$on
- $on<K>(type, callback): (() => void)
Type Parameters
Parameters
- type: K
- callback: ((e: CustomEvent<any>) => void)
- (e): void
Parameters
- e: CustomEvent<any>
Returns void
Returns (() => void)
- (): void
Returns void
$set
- $set(props): void
Parameters
- props: Partial<TJSSettingsSwap.Props>
Returns void
TJSSettingsSwap
provides 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
TJSSettingsEdit
is that you define thesettings-header
andsettings-footer
slots inside theTJSSettingsSwap
content.Controlling the swap state is accessible from
TJSGameSettingsWithUI.uiControl.showSettings
accessor (get or set). This allows for instance the creation of an app header button to swap between the main slotted component andTJSSettingsEdit
.