JSPM

  • Created
  • Published
  • Downloads 227
  • Score
    100M100P100Q95291F
  • License ISC

A color swatch field for Payload 3

Package Exports

  • payload-color-swatch-field-test
  • payload-color-swatch-field-test/index.ts

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (payload-color-swatch-field-test) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

payload-color-swatch-field

A color swatch field for Payload 3

Installation

npm i @spaced-man/payload-color-swatch-field

NOTE: At the time of writing this, you may experience package conflicts with Payload Beta. You may need to use npm i with --force

Usage

import type { CollectionConfig } from "payload";
import ColorSwatchField from "@modernaut/payload-color-swatch-field";

const Lorem: CollectionConfig = {
  slug: "lorem",
  admin: {
    useAsTitle: "title",
  },
  fields: [
    {
      name: "title",
      type: "text",
      required: true,
    },
    colorSwatchField,
  ],
};

export default Lorem;

Credit