swirl-short-videos-typescript
v1.5.1
Published
Made with create-react-library
Downloads
99
Readme
swirl-ssv
This is a package for swirl short videos which can be installed and used in react projects.
Install
npm i swirl-short-videos-typescript --force
Usage
Make a tsx component for swirl
"use client"
import React, { Component } from 'react'
import { SwirlShortVideos } from "swirl-short-videos-typescript"
export class SwirlComp extends Component {
render() {
return (
<SwirlShortVideos dataCode="your-data-code" dataPlalistCode="your-playlist-code" dataWs="your-data-ws-code" cart={{
token: '',
cartCount: "",
}}
serverType='development'
/>
)
}
}
export default SwirlComp
Import swirl css in your globals.css file
@import url(https://apigoswirl.com/short_video/react/v12/swirl-short-videos-v1.min.css);
Use previously made component in your pages
import SwirlComponent from './SwirlComp'
export default function Home() {
return (
<>
<SwirlComponent /> {** Also you can pass your playlist code from here as props**}
</>
)
}
Add this in your tsconfig.json
"noImplicitAny": false
License
MIT © goswirl-github