1.0.3 • Published 2 years ago

@itandu/toolkit-commerce v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Commerce toolkit

A toolkit for building e-commerce websites with Cromwell CMS

Links

Install

npm i @itandu/toolkit-commerce

Some components of this package use react-toastify. If you need notifications add ToastContainer into your custom app:

import React from 'react';
import { ToastContainer } from 'react-toastify';

export default function App() {
  return (
    <div>
      /* ... */
      <ToastContainer />
    </div>
  );
}

Add global CSS in cromwell.config.js:

module.exports = {
  globalCss: [
    '@itandu/toolkit-commerce/dist/_index.css',
    'react-toastify/dist/ReactToastify.css'
  ],
}

Use

Example of usage of a component for product category:

import { MuiCategoryList } from '@itandu/toolkit-commerce';
import React from 'react';

export default function CategoryPage() {
  return (
      <MuiCategoryList />
  )
}

export const getStaticProps = MuiCategoryList.withGetProps();

List of components

HOCs

Material UI HOCs