babblebots-react-staging
TypeScript icon, indicating that this package has built-in type declarations

1.0.27 • Public • Published

babblebots-react

Babblebots utility react components

NPM JavaScript Style Guide

Install

npm install babblebots-react

Usage

Interview Designer Props Explanation

apiKey -- An integration key provided by babblebots team to your organization. You need to pass it in the argument such that we can verify the requests.

API Image

jdUrl -- A Public Job Description URL. We will be embedding this job description while sending interview requests in WhatsApp.

jdInformation -- Parsed job description text. It is required to show skills while creating the interview

onPublish -- A callback function responsible for storing the resultant object after creating the interview

interviewdetails -- The object returned from the onPublish function and we need to pass it in case of editing the interview details. Initially you can pass an empty object --> {}

isOpen -- Its a flag to open our interview designer component initially

Interview Designer Component

import React, { useEffect, useState } from 'react'
import { Button, Stack } from '@mui/material'
import {InterviewDesignerDialog} from 'babblebots-react'
import 'babblebots-react/dist/index.css'
let tempkey=''
let jdUrl:'Accessible JD URL of the Company'
let jdInformation:'Job Description Details'

const App = () => {
  const [intervisible, setInterVisible] = useState(false);
  const [interviewdetails,setInterviewDetails]=useState({});
  return (
    <Stack
      sx={{ width: '100vw', height: '100vh' }}
      alignItems={'center'}
      justifyContent={'center'}
    >
      <Button
        variant='contained'
        onClick={() => {
          setInterVisible(true)
        }}
      >
        Create Interview
      </Button>
      {intervisible ? 
          (
        <InterviewDesignerDialog
          apiKey={tempkey}
          jdUrl={jdUrl}
          jdInformation={jdInformation}
          onPublish={(data)=>{
            console.log('InterviewData', data)
            setInterviewDetails(data);
          }}
          isOpen={true}
          interviewdetails={interviewdetails}
          />
      ) : (
        <> </>
      )}
    </Stack>
  )
}

Update Interview Settings Props Explanation

apiKey -- An integration key provided by babblebots team to your organization. You need to pass it in the argument such that we can verify the requests.

interviewId -- An object is returned while creating the interview. So interviewId is basically a field used by us to update each interview settings.

Interview Settings Component

import React, { useEffect, useState } from 'react'
import {UpdateInterviewSettings} from 'babblebots-react'
import 'babblebots-react/dist/index.css'
let props={
  apiKey:'',
  interviewId:'1324'
}

const App = () => {
  return (
    <UpdateInterviewSettings
        apiKey={props.apiKey}
        interviewId={props.interviewId}
    />
  )
}

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i babblebots-react-staging

Weekly Downloads

2

Version

1.0.27

License

MIT

Unpacked Size

1.85 MB

Total Files

71

Last publish

Collaborators

  • jagjeets
  • pulkitg2002