Skip to content

Commit

Permalink
frame
Browse files Browse the repository at this point in the history
  • Loading branch information
Zizzamia committed Feb 2, 2024
1 parent 0d2edfe commit 0fd7a75
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/components/FrameMetadata.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
import type { FrameMetadata as FrameMetadataType } from '../core/types';

/**
*
* FrameMetadata component
*
* @description
* This component is used to add React Frame Metadata to the page.
*
* @example
* ```tsx
* <FrameMetadata
* image="https://example.com/image.png"
* post_url="https://example.com"
* buttons={[{ label: 'button1' }]}
* />
* ```
*
* @param {FrameMetadataType} props - The metadata for the frame.
* @param {string} props.image - The image URL.
* @param {string} props.input - The input text.
* @param {string} props.post_url - The post URL.
* @param {number} props.refresh_period - The refresh period.
* @param {Array<{ label: string, action?: string }>} props.buttons - The buttons.
* @returns {React.ReactElement} The FrameMetadata component.
*/
export function FrameMetadata({
buttons,
Expand Down

0 comments on commit 0fd7a75

Please sign in to comment.