1.1.2 • Published 3 years ago

sanity-plugin-disabled-field v1.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

sanity-note-field

Install

Run the following command in your studio folder using the Sanity CLI:

sanity install note-field

Usage

Use it in your schema types:

{
  name: 'note',
  type: 'note',
  options: {
    message: 'Your custom Message...'
  }
}

Options

You can also customize the color, add an icon and/or headline:

import React from 'react'

...

{
  name: 'gridNote2',
  type: 'note',
  options: {
    icon: FiAlertCircle,
    headline: 'Hold up!',
    message: <>A custom HTML message: <a href="#0" target="_blank">click here</a></>,
    tone: 'caution'
  }
}
NameTypeDefaultDescription
iconComponentnullSpecify an Icon Component, just as you would for your schemas
headlinestringnullDisplays a headline above your note message
messagestringnullRequired. Your note message (accepts HTML)
tonestringprimaryColor style for your note, based on the Sanity UI Card options. Values: default transparent positive caution critical brand

License

MIT

nickdimatteo.com  ·  Github @ndimatteo  ·  Instagram @ndimatteo