Skip to content

Commit

Permalink
Add button config metadata (#11)
Browse files Browse the repository at this point in the history
* Add buttons to callback args.

* Use title instead of text.
  • Loading branch information
AdamHickey00 authored and Blackbaud-AdamHickey committed Jan 30, 2019
1 parent 81fb7df commit c831d35
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/addin/client-interfaces/addin-button-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { AddinButtonStyle } from './addin-button-style';

/**
* Interface for defining configuration options for Button add-ins
*/
export interface AddinButtonConfig {

/**
* The style to use for the button
*/
style?: AddinButtonStyle;

}
16 changes: 16 additions & 0 deletions src/addin/client-interfaces/addin-button-style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Defines the style of the button
*/
export enum AddinButtonStyle {
// No style (default)
None = 0,

// The button represents an "add" operation
Add = 1,

// The button represents an "edit" operation
Edit = 2,

// The button represents a "delete" operation
Delete = 3
}
6 changes: 6 additions & 0 deletions src/addin/client-interfaces/addin-client-ready-args.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { AddinButtonConfig } from './addin-button-config';

/**
* Interface for informing the AddinClient that the add-in is ready.
* Will dictate if and how the add-in should show in the host page.
Expand All @@ -14,4 +16,8 @@ export interface AddinClientReadyArgs {
*/
title?: string;

/**
* Metadata used when displaying a button.
*/
buttonConfig?: AddinButtonConfig;
}

0 comments on commit c831d35

Please sign in to comment.