more-desk-one 0.0.16 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +14 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -15,7 +15,10 @@ yarn add more-desk-one
15
15
  ```
16
16
 
17
17
  1️⃣ Import SDK and styles
18
+
19
+ ```
18
20
  import { init, ChatButton } from "more-desk-one";
21
+ ```
19
22
 
20
23
  2️⃣ Initialize the SDK
21
24
 
@@ -23,6 +26,7 @@ Call init() once you have a valid access token.
23
26
 
24
27
  ⚠️ You must call init() before using the chat widget.
25
28
 
29
+ ```
26
30
  useEffect(() => {
27
31
  if (!accessToken) return;
28
32
  init({
@@ -35,12 +39,15 @@ app: "SSO_APP_NAME",
35
39
  idp: "SSO_IDP"
36
40
  });
37
41
  }, [accessToken]);
42
+ ```
38
43
 
39
44
  💬 Display the Chat Button
40
45
 
41
46
  Add the chat button anywhere in your React component tree:
42
47
 
48
+ ```
43
49
  <ChatButton align="end" side="right" />
50
+ ```
44
51
 
45
52
  ⚙️ init() Configuration Options
46
53
 
@@ -53,16 +60,17 @@ Add the chat button anywhere in your React component tree:
53
60
  | `redirectUrl` | `string` | ✔ | SSO redirect URL |
54
61
  | `app` | `string` | ✔ | Application identifier (e.g., `jedi`) |
55
62
  | `idp` | `string` | ✔ | Identity provider base |
56
- | URL |
57
63
 
58
64
  🧩 ChatButton Props
59
65
 
60
- | Prop | Type | Default | Description |
61
- | ------- | ------------------------------ | ------- | ------------------ |
62
- | `align` | `"start" \| "center" \| "end"` | `end` | Vertical alignment |
63
- | `side` | `"left" \| "right"` | `right` | Screen side |
66
+ | Prop | Type | Default | Description |
67
+ | ------- | --------------------------------------- | ------- | ------------------ | ----------- |
68
+ | `align` | `"start" \| "center" \| "end"` | `end` | Vertical alignment |
69
+ | `side` | `"left" \| "right" \| "top"\| "bottom"` | `top` | ` | Screen side |
64
70
 
65
71
  🧪 Full Example
72
+
73
+ ```
66
74
  import { useEffect } from "react";
67
75
  import { init, ChatButton } from "more-desk-one";
68
76
 
@@ -87,3 +95,4 @@ if (!accessToken) return;
87
95
 
88
96
  return <ChatButton align="end" side="right" />;
89
97
  }
98
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "more-desk-one",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"