hive-react-kit 0.6.1 → 0.6.2

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.
package/README.md CHANGED
@@ -228,6 +228,14 @@ import { HiveDetailPost } from 'hive-react-kit';
228
228
  onSubmitComment={(pAuthor, pPermlink, body) => console.log("Comment:", body)}
229
229
  />
230
230
 
231
+ // Custom gradient background
232
+ <HiveDetailPost
233
+ author="sagarkothari88"
234
+ permlink="my-first-post"
235
+ backgroundColor={["#0f172a", "#1e293b", "#0f3460"]}
236
+ onUpvote={(percent) => console.log("Upvote:", percent)}
237
+ />
238
+
231
239
  // Full usage with all callbacks
232
240
  <HiveDetailPost
233
241
  author="sagarkothari88"
@@ -256,6 +264,7 @@ import { HiveDetailPost } from 'hive-react-kit';
256
264
  | `author` | `string` | *required* | Hive account name of the post author |
257
265
  | `permlink` | `string` | *required* | Permlink of the post |
258
266
  | `currentUser` | `string` | `undefined` | Logged-in username. Required for upvote/comment/reblog |
267
+ | `backgroundColor` | `string \| string[]` | `undefined` (gray-900) | Single color for solid bg, or array of colors for gradient |
259
268
  | `onBack` | `() => void` | `undefined` | Back button callback. Hidden when not provided |
260
269
  | `onUserClick` | `(username: string) => void` | `undefined` | Called when author avatar/name is clicked |
261
270
 
@@ -14,8 +14,10 @@ export interface HiveDetailPostProps {
14
14
  giphyApiKey?: string;
15
15
  templateToken?: string;
16
16
  templateApiBaseUrl?: string;
17
+ /** Background color for the component. Pass a single color string for a solid background, or an array of colors for a gradient (e.g. `["#0f172a", "#1e293b"]` or `["#1a1a2e", "#16213e", "#0f3460"]`). Defaults to gray-900. */
18
+ backgroundColor?: string | string[];
17
19
  onBack?: () => void;
18
20
  onUserClick?: (username: string) => void;
19
21
  }
20
- export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onShare, onTip, onReport, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, onBack, onUserClick, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onShare, onTip, onReport, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, backgroundColor, onBack, onUserClick, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
21
23
  export default HiveDetailPost;