GithubHelp home page GithubHelp logo

hahlh / sanity-plugin-dashboard-widget-notes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mrkolby/sanity-plugin-dashboard-widget-notes

1.0 0.0 0.0 162 KB

Dashboard widget for the Sanity Content Studio which lets you write simple "post-it" notes

CSS 21.92% JavaScript 78.08%

sanity-plugin-dashboard-widget-notes's Introduction

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.

sanity-plugin-dashboard-widget-notes-2

Quick start

Install the plugin in your Sanity Studio project folder:

sanity install dashboard-widget-notes

Add 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

  1. Fork/clone this repo
  2. Install dependencies (yarn or npm install)
  3. Link for local development (yarn link or npm link)
  4. Run build to compile your changes (yarn build or npm run build)
  5. Link in a local studio folder (yarn link "sanity-plugin-dashboard-widget-notes" or npm link sanity-plugin-dashboard-widget-notes)
  6. Add sanity-dashboard-widget-notes to the plugin array in sanity.json
  7. Add {name: 'notes'} to your dashboardConfig.js

sanity-plugin-dashboard-widget-notes's People

Contributors

dependabot[bot] avatar kmelve avatar mrkolby avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.