1.0.7 • Published 4 years ago

sanity-color-picker v1.0.7

Weekly downloads
11
License
ISC
Repository
github
Last release
4 years ago

Sanity Color Picker

Display colors for editors to choose from with this custom input component.

preview image

Installation

  1. npm install sanity-color-picker
  2. In your schema:
import ColorPicker from "sanity-color-picker/lib";

export default {
  title: "Color Picker",
  name: "colorpicker",
  type: "string",
  inputComponent: ColorPicker,
  options: {
    list: [
      { title: "Yellow", value: "#f5c701" },
      { title: "Pink", value: "#f6cedb" },
      { title: "Red", value: "#f16d70" },
      { title: "Teal", value: "#88c6db" },
      { title: "Purple", value: "#aca0cc" },
      { title: "Green", value: "#bdcdcb" },
      { title: "White", value: "#fff" }
    ]
  }
};
  1. Profit. The component returns the selected value.
1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago