Skip to content

Commit

Permalink
feat: add overlay color option to Boarding class
Browse files Browse the repository at this point in the history
  • Loading branch information
ezeaniiandrew committed Aug 1, 2024
1 parent 4712af8 commit ab2a2f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/boarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class Boarding {
radius: this.options.radius,
onReset: this.options.onReset,
opacity: this.options.opacity,
overlayColor: this.options.overlayColor,
onOverlayClick: () => {
// Perform the 'Next' operation when clicked outside the highlighted element
if (this.options.overlayClickNext) {
Expand Down
6 changes: 6 additions & 0 deletions src/lib/core/overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export interface OverlayTopLevelOptions {
* @default 0.75
*/
opacity?: number;
/**
* Background color for the overlay element
* @default rgb(0,0,0)
*/
overlayColor?: string;
}

interface OverlayOptions
Expand Down Expand Up @@ -377,6 +382,7 @@ class Overlay {
opacity: this.options.opacity,
radius: definition.radius,
animated: this.options.animate,
fillColor: this.options.overlayColor,
};

// mount svg if its not mounted already
Expand Down

0 comments on commit ab2a2f9

Please sign in to comment.