@cd-tne/release-calendar
v1.0.2
Published
The Channel Dynamics Release Calendar is a UI component that displays a calendar of releases. It is designed to be embedded in a React website.
Downloads
1
Readme
Channel Dynamics Release Calendar
The Channel Dynamics Release Calendar is a UI component that displays a calendar of releases. It is designed to be embedded in a React website.
Usage
From CDN
In order to show the Release Calendar on a website, the following steps are required:
- Include the component script in the website's HTML, preferably at the bottom of the page
For versioned releases, replace <version>
with the version number of the release. For example, 1.0.0
.
</body>
<script src="https://cd-release-calendar.pages.dev/<version>/index.js"></script>
</html>
For the latest version, remove the <version>
from the URL.
</body>
<script src="https://cd-release-calendar.pages.dev/index.js"></script>
</html>
- Add a div element with the id
cd-release-calendar
where the component should be displayed.<div id="cd-release-calendar"></div>
From NPM
- Install the package
npm install @cd-tne/release-calendar
- Import the component in the React component where it should be displayed
import ReleaseCalendar from '@cd-tne/release-calendar/ReleaseCalendar';
or if you are using an older version of TypeScript:
import ReleaseCalendar from '@cd-tne/release-calendar/dist/components/ReleaseCalendar';
- Add the component to the React component's render method
<ReleaseCalendar colorize/>
Hosting
The widget is hosted on Cloudflare's CDN, and is served from the cd-release-calendar.pages.dev
domain.
Customization
Release Calendar API URL
The URL for the API can be set by adding a data-release-calendar-url
property
to the div element that the widget is placed in. For example:
<div id="cd-release-calendar" data-release-calendar-url="https://example.com"></div>
The default value for the URL is
https://c4i22tdbqi.execute-api.us-east-1.amazonaws.com
.