import type { CellPlugin } from '@react-page/editor' ; import React from 'react' ; import { Timeline } from 'react-twitter-widgets' ; type Data = { screenName : string ; height : number ; title : string ; } ; const customContentPluginTwitter = { Renderer : ( { data } ) => ( < div > < h4 > { data . title } < /h4> < Timeline dataSource = { { sourceType : 'profile' , screenName : data . screenName , } } options = { { height : data . height || 600 , } } /> < /div>), id : 'twitter-timeline' , title : 'Twitter timeline' , description : 'A twitter timeline' , version : 1 , controls : { type : 'autoform' , schema : { properties : { title : { type : 'string' , default : 'A Sample Twitter plugin' , } , screenName : { type : 'string' , default : 'typescript' , } , height : { type : 'number' , default : 600 , } , } , required : [ 'screenName' ] , } , } , } ; export default customContentPluginTwitter ;