🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-telegram-sticker-viewer

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-telegram-sticker-viewer

React component for viewing telegram sticker url with .tgs extension got from the telegram bot webhook

0.0.7
latest
Source
npm
Version published
Weekly downloads
2
Maintainers
0
Weekly downloads
 
Created
Source

react-telegram-sticker-viewer

React Telegram Sticker Viewer

Install

$ npm install react-telegram-sticker-viewer

Usage

For a live demo, visit: https://kokim2022.github.io/react-telegram-sticker-viewer/

Example

import React, { useState } from 'react';
import ReactTelegramStickerViewer from 'react-telegram-sticker-viewer';

const App: React.FC = () => {
  const [tgsUrl, setTgsUrl] = useState<string>(
    'https://cdn.chatapi.net/stickers/telegram/1c49672ec5dbeef5cfd517996acf2bac/file_10.tgs'
  );

  return (
    <ReactTelegramStickerViewer
      tgsUrl={tgsUrl}
      // Optional: You can pass a custom CORS proxy URL if needed
      // corsProxyServerUrl="https://your-custom-cors-proxy.com/?url="
      style={{ height: '300px', width: '300px' }}
    />
  );
};

export default App;

Props of Component

  • tgsUrl (required, string)
    The URL of the Telegram Sticker (TGS file) to be displayed.

  • style (optional, object)
    The style of the sticker viewer. Default is { height: '100px', width: '100px' }.

  • corsProxyServerUrl (optional, string)
    You can provide a custom CORS proxy URL if needed. This is useful if you're encountering CORS issues when accessing the TGS URL.

LICENSE

MIT @ kokim2020.

Keywords

react

FAQs

Package last updated on 09 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts