cal.pub0.org/packages/embeds/embed-react
Hariom Balhara 6fd64b2209
Fix: cssVars API not working correctly on Booker Timeslot selection page (#8296)
* Use a method out of react scope to set CSS vars as that doesnt need react

* Refactor
2023-04-18 12:53:46 +00:00
..
playwright/tests Make embed tests work with single playwright config (#7781) 2023-03-16 11:16:09 -07:00
src Embed: Strictly type the codebase and fixes a few bugs found (#7536) 2023-03-28 11:17:40 -07:00
.gitignore
LICENSE Add licenses to embeds (#2984) 2022-06-07 08:25:55 +00:00
README.md feat: trpc v10 migration (#5332) 2022-11-10 23:40:01 +00:00
env.d.ts
floating.html Embed: Strictly type the codebase and fixes a few bugs found (#7536) 2023-03-28 11:17:40 -07:00
floating.tsx Embed: Strictly type the codebase and fixes a few bugs found (#7536) 2023-03-28 11:17:40 -07:00
index.html Embed: Strictly type the codebase and fixes a few bugs found (#7536) 2023-03-28 11:17:40 -07:00
inline.tsx Fix: cssVars API not working correctly on Booker Timeslot selection page (#8296) 2023-04-18 12:53:46 +00:00
package.json Improves reported type errors on CI (#7813) 2023-03-28 13:12:40 -07:00
tsconfig.json Fixes embeds tsconfig (#7995) 2023-03-30 16:20:39 +00:00
vite.config.js

README.md

cal-react

Embed Cal Link as a React Component

To know how to use it, follow the steps at https://developer.cal.com/embed/install-with-react

Development

Following command starts a hot reloading server yarn dev

If you are working with embed on website, don't forget to do yarn build after every change.

Running Tests

Runs tests and updates the snapshots. Right now we don't care about snapshots yarn embed-tests-quick --update-snapshots TODO

  • Playwright tests.
    • Need to what these tests should be as embed-core already have tests. We probably just need to verify that embed-core API is called appropriately.
    • It would probably be better if Playwright tests exist at one place for all embeds.
  • Distribution
    • It would be better DX to serve the unbuilt version with JSX, instead of built version with React.createElement calls. But because of WebPack loaders not running on node_modules automatically, it doesn't work automatically.
    • Right now if a typescript project uses the package, VSCode takes the user to .d.ts files instead of the functions definitions. How to solve it ?