@contenthouse_developers/compo-contenthouse
v1.2.0
Published
A reusable React component library
Readme
@contenthouse_developers/compo-contenthouse
A reusable React component library for ContentHouse applications.
🚀 Installation
Install via npm or Yarn:
npm install @contenthouse_developers/compo-contenthouse
# or
yarn add @contenthouse_developers/compo-contenthouse⚠️ This library has peer dependencies. Make sure they are installed in your project:
npm install react react-dom react-router-dom
npm install @mui/material @emotion/react @emotion/styled @mui/x-date-pickers @mui/icons-material
npm install @tabler/icons-react
npm install prop-types luxon react-perfect-scrollbar📦 Usage
Import the component(s) you need:
import React from 'react'
import { AvatarButton } from '@contenthouse_developers/compo-contenthouse'
function App() {
return (
<AvatarButton callbacks={{ toggleClick: () => console.log('click') }}>
<AddCircleOutlineOutlinedIcon fontSize="inherit" />
</AvatarButton>
)
}Importing assets/icons
You can import all icons by:
import * as assets from '@contenthouse_developers/compo-contenthouse/icons'You can also import a specific icon by:
import { copywriting } from '@contenthouse_developers/compo-contenthouse/icons'Importing utilities
You can import a utility by:
import { filterToDate } from '@contenthouse_developers/compo-contenthouse/utils'🛠 Development
To build the library locally:
npm install
npm run build🚢 Publishing to npm
To publish a new version of the package:
- Make sure you are logged in to npm (
npm whoami). If not, runnpm login. - Update the package version in
package.json. - Build the library:
npm run build. - Publish to npm:
npm publish.
Note: Be careful when publishing. Once a version is published, it cannot be unpublished. Double-check your changes before publishing.
