vue-tweet-pure
Version:
A Vue 3 component for embedding tweets in your Vue.js applications.
44 lines (43 loc) • 1.46 kB
TypeScript
import { type TwitterComponents } from './twitter-theme/components';
import type { Component } from 'vue';
interface TweetProps {
/**
* Tweet id (Required)
* @example 1234567890
*/
id: string;
/**
* Twitter API url, twitter content will be fetched from `apiUrl/:id`
* @default https://react-tweet.vercel.app/api/tweet
*/
apiUrl?: string;
/**
* Fallback component to render if the tweet fails to load
* @default TweetSkeleton
*/
fallback?: Component;
/**
* Custom components to render the tweet
* @default defaultTwitterTheme
*/
components?: TwitterComponents;
/**
* Custom fetch options to pass to the fetch request
* @default {}
*/
fetchOptions?: RequestInit;
/**
* Callback to handle errors
* @default (error) => error
*/
onError?: (error: Error | null) => Error | null;
}
declare const __VLS_export: import("vue").DefineComponent<TweetProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TweetProps> & Readonly<{}>, {
fallback: Component;
components: TwitterComponents;
onError: (error: Error | null) => Error | null;
apiUrl: string;
fetchOptions: RequestInit;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
declare const _default: typeof __VLS_export;
export default _default;