@bigbinary/neeto-molecules 1.1.64 → 1.1.66

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.
@@ -1,4 +1,11 @@
1
1
  import React from "react";
2
+ import { IconProps } from "neetoicons";
3
+ type MoreOptions = {
4
+ title: string;
5
+ link: Function;
6
+ icon: React.ReactNode;
7
+ dataCy: string;
8
+ };
2
9
  /**
3
10
  *
4
11
  * A common component to share the link in multiple ways.
@@ -91,6 +98,31 @@ import React from "react";
91
98
  * />
92
99
  * );
93
100
  * @endexample
101
+ * With more share options
102
+ *
103
+ * @example
104
+ *
105
+ * import ShareViaLink from "@bigbinary/neeto-molecules/ShareViaLink";
106
+ * import { Message } from "neetoicons";
107
+ *
108
+ * const Share = ({ quiz }) => (
109
+ * <ShareViaLink
110
+ * entity={quiz}
111
+ * entityName="quiz"
112
+ * previewUrl={quizPreviewUrl}
113
+ * socialMediaPostTitle="Hi, can you please attend this quiz?"
114
+ * url={quizUrl}
115
+ * moreOptions={[
116
+ * {
117
+ * title: "Invite via email",
118
+ * link: "/",
119
+ * icon: Message,
120
+ * dataCy: "share-via-email-link",
121
+ * },
122
+ * ]}
123
+ * />
124
+ * );
125
+ * @endexample
94
126
  */
95
127
  const ShareViaLink: React.FC<{
96
128
  isLoading?: boolean;
@@ -113,5 +145,6 @@ const ShareViaLink: React.FC<{
113
145
  previewUrl?: string;
114
146
  socialMediaPostTitle: string;
115
147
  url: string;
148
+ moreOptions?: MoreOptions[];
116
149
  }>;
117
150
  export default ShareViaLink;