Skip to content

Commit f65e3a7

Browse files
authored
Merge pull request #785 from navelencia/main
Add support for `zIndex` property
2 parents 095dc35 + 0d8353d commit f65e3a7

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

.changeset/khaki-sloths-heal.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'react-use-intercom': patch
3+
---
4+
5+
Add support for zIndex launcher property

packages/react-use-intercom/src/mappers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export const mapMessengerAttributesToRawMessengerAttributes = (
1919
alignment: attributes.alignment,
2020
vertical_padding: attributes.verticalPadding,
2121
horizontal_padding: attributes.horizontalPadding,
22+
z_index: attributes.zIndex,
2223
hide_default_launcher: attributes.hideDefaultLauncher,
2324
session_duration: attributes.sessionDuration,
2425
action_color: attributes.actionColor,

packages/react-use-intercom/src/types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export type RawMessengerAttributes = {
33
alignment?: string;
44
vertical_padding?: number;
55
horizontal_padding?: number;
6+
z_index?: number;
67
hide_default_launcher?: boolean;
78
session_duration?: number;
89
action_color?: string;
@@ -34,6 +35,11 @@ export type MessengerAttributes = {
3435
* @see {@link https://docs.intercom.com/configure-intercom-for-your-product-or-site/customize-the-intercom-messenger/customize-the-intercom-messenger-technical}
3536
*/
3637
horizontalPadding?: number;
38+
/** Set the z-index of the messenger
39+
* @remarks The z-index of the messenger. Default value: 2147483001
40+
* @see {@link https://developers.intercom.com/installing-intercom/web/customization}
41+
* */
42+
zIndex?: number;
3743
/** Hide the default launcher icon
3844
*
3945
* @remarks Setting to false will forcefully show the launcher icon

0 commit comments

Comments
 (0)