hive-react-kit 0.6.1 → 0.6.3

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
 
package/dist/build.css CHANGED
@@ -3823,6 +3823,23 @@
3823
3823
  border-radius: 0.75rem;
3824
3824
  margin: 0;
3825
3825
  }
3826
+ .hive-post-body .threeSpeakWrapper {
3827
+ aspect-ratio: 9 / 16;
3828
+ max-width: 450px;
3829
+ width: 100%;
3830
+ margin: 1rem auto;
3831
+ border-radius: 0.75rem;
3832
+ overflow: hidden;
3833
+ background: #000;
3834
+ }
3835
+ .hive-post-body .threeSpeakWrapper iframe {
3836
+ display: block;
3837
+ width: 100%;
3838
+ height: 100%;
3839
+ border: none;
3840
+ border-radius: 0.75rem;
3841
+ margin: 0;
3842
+ }
3826
3843
  .hive-post-body > :first-child {
3827
3844
  margin-top: 0;
3828
3845
  }
@@ -14,8 +14,12 @@ export interface HiveDetailPostProps {
14
14
  giphyApiKey?: string;
15
15
  templateToken?: string;
16
16
  templateApiBaseUrl?: string;
17
+ /** URL to a Hive logo icon shown next to the payout value. Defaults to "/images/hive_logo.png". */
18
+ hiveIconUrl?: string;
19
+ /** 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. */
20
+ backgroundColor?: string | string[];
17
21
  onBack?: () => void;
18
22
  onUserClick?: (username: string) => void;
19
23
  }
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;
24
+ export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onShare, onTip, onReport, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hiveIconUrl, backgroundColor, onBack, onUserClick, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
21
25
  export default HiveDetailPost;