Skip to content

Commit

Permalink
Merge pull request #785 from navelencia/main
Browse files Browse the repository at this point in the history
Add support for `zIndex` property
  • Loading branch information
devrnt authored Feb 8, 2025
2 parents 095dc35 + 0d8353d commit f65e3a7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/khaki-sloths-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-use-intercom': patch
---

Add support for zIndex launcher property
1 change: 1 addition & 0 deletions packages/react-use-intercom/src/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const mapMessengerAttributesToRawMessengerAttributes = (
alignment: attributes.alignment,
vertical_padding: attributes.verticalPadding,
horizontal_padding: attributes.horizontalPadding,
z_index: attributes.zIndex,
hide_default_launcher: attributes.hideDefaultLauncher,
session_duration: attributes.sessionDuration,
action_color: attributes.actionColor,
Expand Down
6 changes: 6 additions & 0 deletions packages/react-use-intercom/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export type RawMessengerAttributes = {
alignment?: string;
vertical_padding?: number;
horizontal_padding?: number;
z_index?: number;
hide_default_launcher?: boolean;
session_duration?: number;
action_color?: string;
Expand Down Expand Up @@ -34,6 +35,11 @@ export type MessengerAttributes = {
* @see {@link https://docs.intercom.com/configure-intercom-for-your-product-or-site/customize-the-intercom-messenger/customize-the-intercom-messenger-technical}
*/
horizontalPadding?: number;
/** Set the z-index of the messenger
* @remarks The z-index of the messenger. Default value: 2147483001
* @see {@link https://developers.intercom.com/installing-intercom/web/customization}
* */
zIndex?: number;
/** Hide the default launcher icon
*
* @remarks Setting to false will forcefully show the launcher icon
Expand Down

0 comments on commit f65e3a7

Please sign in to comment.