Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrkolby/sanity-plugin-dashboard-widget-notes
Dashboard widget for the Sanity Content Studio which lets you write simple "post-it" notes
https://github.com/mrkolby/sanity-plugin-dashboard-widget-notes
sanity-plugin-dashboard-widget
Last synced: 3 months ago
JSON representation
Dashboard widget for the Sanity Content Studio which lets you write simple "post-it" notes
- Host: GitHub
- URL: https://github.com/mrkolby/sanity-plugin-dashboard-widget-notes
- Owner: mrkolby
- License: mit
- Created: 2019-05-27T13:57:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-15T13:41:25.000Z (11 months ago)
- Last Synced: 2024-09-18T05:31:01.753Z (4 months ago)
- Topics: sanity-plugin-dashboard-widget
- Language: JavaScript
- Size: 1.52 MB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-sanity - `sanity-plugin-dashboard-widget-notes` - Dashboard widget for the Sanity Content Studio which lets you write simple "post-it" notes (Plugins / Dashboard plugins)
README
# dashboard-widget-notes
Dashboard widget for the Sanity Content Studio which lets you write simple "post-it" notes.
Uses [polished.js](https://polished.js.org/) to find the best contrast depending on the luminosity of the given `backgroundColor`. Override with `color` in options.
![sanity-plugin-dashboard-widget-notes-2](https://user-images.githubusercontent.com/300595/59165189-4edb9480-8b18-11e9-99c1-7cdd1e5049d3.png)
## Quick start
Install the plugin in your Sanity Studio project folder:
```text
sanity install dashboard-widget-notes
```Add to [dashboardConfig.js](https://www.sanity.io/docs/dashboard/installing-and-configuring-widgets#changing-layout):
```javascript
export default {
widgets: [
{ name: 'notes' }
// ...the rest of your widgets
]
}
```## Options
There are some options available.
### `title` (string)
Widget title. Defaults to `Notes`
```javascript
{
name: 'notes',
options: {
title: 'My notes'
}
}
```### `placeholder` (string)
Placeholder text in the ``. Defaults to `...`
```javascript
{
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`
```javascript
{
name: 'notes',
options: {
title: 'My notes',
placeholder: 'What is up?',
backgroundColor: '#eee',
}
}
```### `color` (string)
Override text color for the widget.
```javascript
{
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`