๐ @bridge/windows
This module allows access to the windows system. View Source Code
js
import { ... } from "@bridge/windows"
โก Functions
createInformationWindow
The createInformationWindow
function creates a new information window that pop's up and tells the user some information.
- Signature:
createInformationWindow(displayName: string, displayContent: string)
- Returns:
void
js
createInformationWindow('Title', 'Your information content')
createInputWindow
The createInputWindow
function creates a new window specifically for text inputs.
- Signature:
createInputWindow(displayName: string, inputLabel: string, defaultValue: string, onConfirm: (input: string) => void, expandText?: string)
- Returns:
void
js
createInputWindow('Title', 'TextInputTitle', 'Default Value', () => {
console.log('Yeet')
})
createDropdownWindow
The createDropdownWindow
function creates a new window for a dropdown input.
- Signature:
createDropdownInput(displayName: string, placeholder: string, options: Array<string>, defaultSelected: string, onConfirm: (input: string) => void)
- Returns:
void
js
const options = ['Option1', 'Option2']
createDropdownWindow('Title', 'PlaceHolder', options, 'Option1', (result) => {
console.log(`You have chosen: ${result}`)
})
createConfirmWindow
The createConfirmWindow
function creates a new window for either a cancel or confirm action.
- Signature:
createConfirmWindow(displayContent: string, confirmText: string, cancelText: string, onConfirm: () => void, onCancel: () => void)
- Returns:
void
js
createConfirmWindow(
'Confirmation Description',
'Confirm',
'Deny',
() => {
console.log('Confirmed')
},
() => {
console.log('Denied')
}
)