0.4.1 • Published 4 years ago
sanity-plugin-dashboard-widget-notes v0.4.1
dashboard-widget-notes
Dashboard widget for the Sanity Content Studio which lets you write simple "post-it" notes.
Uses polished.js to find the best contrast depending on the luminosity of the given backgroundColor. Override with color in options.

Quick start
Install the plugin in your Sanity Studio project folder:
sanity install dashboard-widget-notesAdd to dashboardConfig.js:
export default {
widgets: [
{ name: 'notes' }
// ...the rest of your widgets
]
}Options
There are some options available.
title (string)
Widget title. Defaults to Notes
{
name: 'notes',
options: {
title: 'My notes'
}
}placeholder (string)
Placeholder text in the <textarea>. Defaults to ...
{
name: 'notes',
options: {
title: 'My notes',
placeholder: 'What is up?'
}
}backgroundColor (string)
Background color for the widget. A black or white text color is set automatically depending on the luminosity. Defaults to #ffff88
{
name: 'notes',
options: {
title: 'My notes',
placeholder: 'What is up?',
backgroundColor: '#eee',
}
}color (string)
Override text color for the widget.
{
name: 'notes',
options: {
title: 'My notes',
placeholder: 'What is up?',
backgroundColor: '#eee',
color: 'red',
}
}Local development
- Fork/clone this repo
- Install dependencies (
yarnornpm install) - Link for local development (
yarn linkornpm link) - Run build to compile your changes (
yarn buildornpm run build) - Link in a local studio folder (
yarn link "sanity-plugin-dashboard-widget-notes"ornpm link sanity-plugin-dashboard-widget-notes) - Add
sanity-dashboard-widget-notesto the plugin array insanity.json - Add
{name: 'notes'}to yourdashboardConfig.js