ce-cms-components
v2.10.0
Published
Clients components for ce-cms
Downloads
1,517
Readme
CE-CMS Client Components
Package containing the client components for CE-CMS.
Uses the following packages:
- react
- react-dom
- styled-jsx
- @mdx-js/mdx
- @tabler/icons-react
Installation
Install the package using npm:
npm install ce-cms-components
Usage
API
Import the api handler from the package:
import { CMS_API_Handler } from "ce-cms-components"
const api_key = process.env.CMS_API_KEY ?? ''
const cms_endpoint = process.env.CMS_ENDPOINT ?? ''
const project = 'connoreaton.me'
export default async function handler(req: any, res: any) {
await CMS_API_Handler({ req, res, project, api_key, cms_endpoint, debugMode: true });
}
React Components
Current Components | Component | Description | | --- | --- | | CMS_GalleryRenderer | Image Gallery Renderer with Spotlight | | CMS_ImageRenderer | Image Renderer with Spotlight | | CMS_Loader | Loader Component | | CMS_MDXViewer | MDX Viewer Component | | CMS_QuoteRenderer | Quote Renderer | | CMS_VideoRenderer | Video Renderer |
Import the components you need from the package:
import { CMS_QuoteRenderer } from 'ce-cms-components';
function MyComponent() {
return (
<CMS_QuoteRenderer>
This is a quote
</CMS_QuoteRenderer>
);
}
export default MyComponent;