Skip to content

Commit

Permalink
this-fifo#43 added typescript support
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix-Franz committed Jun 22, 2021
1 parent 5a96b10 commit 8558dc8
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

@types/react
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
Expand All @@ -16,6 +16,7 @@ dist
.env.development.local
.env.test.local
.env.production.local
.idea

npm-debug.log*
yarn-debug.log*
Expand Down
53 changes: 53 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import React, {CSSProperties, ReactElement} from 'react'
// @ts-ignore
import core from './index.js'

export interface JutsuProps extends React.HTMLProps<React.ReactElement<any, any>> {

// The meeting room name
roomName: string;

// The participant's displayed name
displayName?: string;

// The meeting room password
password?: string;

// Callback function executed after readyToClose event is fired
onMeetingEnd?: () => void;

// The meeting subject (what is displayed at the top)
subject?: string;

// Custom jitsi domain
domain?: string;

// component displayed while loading
loadingComponent?: React.ReactElement<any, any>;

// component displayed on error
errorComponent?: React.ReactElement<any, any>;

// Internally Jutsu is constructed inside 2 containers, you can add custom styles for each by specifying containerStyles and jitsiContainerstyles
containerStyles?: CSSProperties;
jitsiContainerStyles?: CSSProperties;

// Configuration object to overwrite. Visit https://github.com/jitsi/jitsi-meet/blob/master/config.js
configOverwrite?: any;

// Interface configuration object to overwrite. Visit https://github.com/jitsi/jitsi-meet/blob/master/interface_config.js
interfaceConfigOverwrite?: any;

// Callback function to be called with an error as the only parameter if any.
onError?: () => void;

// Callback function to be called with the jitsi API client when instantiated.
onJitsi?: () => void;

// Any other prop passed to the component will be passed to jitsi API constructor as part of the options parameter.
jwt?: any;
devices?: any;
userInfo?: any;
}

export const Jutsu: (props: JutsuProps) => ReactElement = core.Jutsu
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"useJitsi",
"videoconference"
],
"types": "index.d.ts",
"main": "dist/index.js",
"module": "dist/index.es.js",
"jsnext:main": "dist/index.es.js",
Expand Down

0 comments on commit 8558dc8

Please sign in to comment.