-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[actions-bar-set-display] - added ui-command to make it possible for …
…the developer to display or hide the actions-bar
- Loading branch information
Showing
6 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { ActionsBarEnum } from './enums'; | ||
import { SetDisplayActionBarCommandArguments } from './types'; | ||
|
||
export const actionsBar = { | ||
/** | ||
* Decides whether to display the actions bar | ||
* | ||
* @param setSpeakerLevelCommandArgumentsthe volume to which the core will set the speaker | ||
* level. | ||
* Refer to {@link SetDisplayActionBarCommandArguments} to understand the argument structure. | ||
*/ | ||
setDisplayActionBar: (arg: SetDisplayActionBarCommandArguments) => { | ||
const { displayActionBar } = arg; | ||
window.dispatchEvent(new CustomEvent< | ||
SetDisplayActionBarCommandArguments | ||
>(ActionsBarEnum.SET_DISPLAY_ACTIONS_BAR, { | ||
detail: { | ||
displayActionBar, | ||
}, | ||
})); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export enum ActionsBarEnum { | ||
SET_DISPLAY_ACTIONS_BAR = 'SET_DISPLAY_ACTIONS_BAR_COMMAND', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export interface SetDisplayActionBarCommandArguments { | ||
displayActionBar: boolean; | ||
} | ||
|
||
export interface UiCommandsActionsBarObject { | ||
setDisplayActionBar: ( | ||
arg: SetDisplayActionBarCommandArguments | ||
) => void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters