Skip to content

Commit

Permalink
feat(extensible-area): add icon to actions bar separator
Browse files Browse the repository at this point in the history
Adds an optional parameter 'icon' to the actions bar separator
component, which allows for setting the separator to be an icon instead
of a vertical bar.
  • Loading branch information
Arthurk12 committed Jan 15, 2025
1 parent ac19f69 commit af1e90e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/extensible-areas/actions-bar-item/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,24 @@ export class ActionsBarButton extends ActionsBarItem {
}

export class ActionsBarSeparator extends ActionsBarItem {
icon: string;

/**
* Returns object to be used in the setter for action bar. In this case,
* a separator.
*
* @param position - position that this button will be displayed, see {@link ActionsBarPosition}
* @param icon - Icon to be displayed as the separator. If not provided, the default separator
* (a vertical bar) will be displayed.
*
* @returns Object that will be interpreted by the core of Bigbluebutton (HTML5)
*/
constructor({
position = ActionsBarPosition.RIGHT,
icon = '',
}: ActionsBarSeparatorProps) {
super({ type: ActionsBarItemType.SEPARATOR, position });
this.icon = icon;
}
}

Expand Down
1 change: 1 addition & 0 deletions src/extensible-areas/actions-bar-item/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface ActionsBarButtonProps {

export interface ActionsBarSeparatorProps {
position: ActionsBarPosition;
icon?: string;
}

export interface SelectOption {
Expand Down

0 comments on commit af1e90e

Please sign in to comment.