Skip to content

Add support for zIndex property #785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading