@autocloud/calendly
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@autocloud/calendly

Calendly utilities

Usage

The idea behind this package is to provide a global calendly modal to be reused.

To do this, a CalendlyProvider context and useCalendly hook are available.

Add the provider somewhere in your react app:

import ReactDOM from 'react-dom'
import { CalendlyProvider } from '@autocloud/calendly'

ReactDOM.render(
  <CalendlyProvider>
    <App />
  <CalendlyProvider/>,
  document.getElementById('root')
)

and then use the useCalendly hook to show the popup

import { useCalendly } from '@autocloud/calendly'

const Dummy = () => {
  const { openCalendly } = useCalendly()
  return (
    <button onClick={openCalendly}>Show Calendly</button>
  )
}

You can passed options prop to CalendarProvider Defaults:

{
  url = 'https://calendly.com/autocloud-team/autocloud-demo',
  pageSettings = {},
  prefill = {},
  rootElement = document.getElementById('root'),
}

See to react-calendly as reference for pageSettings and prefill

Readme

Keywords

none

Package Sidebar

Install

npm i @autocloud/calendly

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

10.4 kB

Total Files

15

Last publish

Collaborators

  • enciso_autocloud
  • ckoning
  • tyson_kunovsky