Skip to content

Commit 76f951b

Browse files
authored
Merge pull request #253 from BrentBaccala/add-color-to-actions-bar-button
feat(actions-bar): add color property to ActionsBarButton
2 parents 77e4f61 + fa2a48d commit 76f951b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/extensible-areas/actions-bar-item/component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ export class ActionsBarButton extends ActionsBarItem {
4646

4747
onClick: () => void;
4848

49+
color: string;
50+
4951
/**
5052
* Returns object to be used in the setter for action bar. In this case,
5153
* a button.
@@ -56,11 +58,13 @@ export class ActionsBarButton extends ActionsBarItem {
5658
* @param dataTest - string attribute to be used for testing
5759
* @param onClick - function to be called when clicking the button
5860
* @param position - position that this button will be displayed, see {@link ActionsBarPosition}
61+
* @param color - button color variant, defaults to 'primary'
5962
*
6063
* @returns Object that will be interpreted by the core of Bigbluebutton (HTML5)
6164
*/
6265
constructor({
6366
id, icon, tooltip = '', dataTest = '', onClick = () => {}, position = ActionsBarPosition.RIGHT,
67+
color = 'primary',
6468
}: ActionsBarButtonProps) {
6569
super({
6670
id, type: ActionsBarItemType.BUTTON, position, dataTest,
@@ -69,6 +73,7 @@ export class ActionsBarButton extends ActionsBarItem {
6973
this.tooltip = tooltip;
7074
this.dataTest = dataTest;
7175
this.onClick = onClick;
76+
this.color = color;
7277
}
7378
}
7479

src/extensible-areas/actions-bar-item/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export interface ActionsBarButtonProps {
3636
position: ActionsBarPosition;
3737
dataTest?: string;
3838
onClick: () => void;
39+
color?: string;
3940
}
4041

4142
export interface ActionsBarSeparatorProps {

0 commit comments

Comments
 (0)