Built using Lit and bundled using Vite.
<script type="module">
import "/js/helpers/web-components.es.js";
</script>
<nav-bar
companyName="{{acs.co_name}}"
portalKey="{{customer.custom_key}}"
></nav-bar>
<style>
nav-bar:not(:defined) {
display: block;
min-height: 56px;
background-color: #14243e;
color: #fff;
}
</style>
Run build, then in the nav-wrapper.tsx
file, change the import from:
import("@copilotcrm/web-components/nav-bar");
to:
import("path-to-local/dist/web-components/nav-bar");
Viewable at http://localhost:5173
pnpm dev
pnpm build
Published to NPM as @copilotcrm/web-components
. Update the version in the package.json
file and run the following command to publish.
pnpm --filter @copilotcrm/web-components publish --access public