You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/development-guides.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -313,7 +313,7 @@ export default {
313
313
All widgets extend from the [Widget](https://github.com/Lissy93/dashy/blob/master/src/mixins/WidgetMixin.js) mixin. This provides some basic functionality that is shared by all widgets. The mixin includes the following `options`, `startLoading()`, `finishLoading()`, `error()` and `update()`.
314
314
315
315
-**Getting user options: `options`**
316
-
- Any user-specific config can be accessed with `this.options.something` (where something is the data key your accessing)
316
+
- Any user-specific config can be accessed with `this.options.something` (where something is the data key you're accessing)
317
317
-**Loading state: `startLoading()` and `finishLoading()`**
318
318
- You can show the loader with `this.startLoading()`, then when your data request completes, hide it again with `this.finishLoading()`
319
319
-**Error handling: `error()`**
@@ -341,7 +341,7 @@ computed: {
341
341
342
342
#### **Adding an API Endpoint**
343
343
344
-
If your widget makes a data request, then add the URL for the API under point to the `widgetApiEndpoints` array in [`defaults.js`](https://github.com/Lissy93/dashy/blob/master/src/utils/defaults.js#L207)
344
+
If your widget makes a data request, then add the URL for the API endpoint to the `widgetApiEndpoints` array in [`defaults.js`](https://github.com/Lissy93/dashy/blob/master/src/utils/defaults.js#L207)
345
345
346
346
```javascript
347
347
widgetApiEndpoints: {
@@ -410,7 +410,7 @@ Now that the results are in the correct format, and stored as data variables, we
410
410
411
411
#### **Styling**
412
412
413
-
Styles can be written your your widget within the `<style>` block.
413
+
Styles can be written for your widget within the `<style>` block.
414
414
415
415
There are several color variables used by widgets, which extend from the base palette. Using these enables users to override colors to theme their dashboard, if they wish. The variables are: `--widget-text-color`, `--widget-background-color` and `--widget-accent-color`
416
416
@@ -439,7 +439,7 @@ Here, the `example-widget` property name will be used to identify the widget whe
439
439
440
440
### Step 4 - Docs
441
441
442
-
Finally, add some documentation for your widget in the [Widget Docs](https://github.com/Lissy93/dashy/blob/master/docs/widgets.md), so that others know hoe to use it. Include the following information: Title, short description, screenshot, config options and some example YAML.
442
+
Finally, add some documentation for your widget in the [Widget Docs](https://github.com/Lissy93/dashy/blob/master/docs/widgets.md), so that others know how to use it. Include the following information: Title, short description, screenshot, config options and some example YAML.
443
443
444
444
**Summary**: For a complete example of everything discussed here, see: [`3da76ce`](https://github.com/Lissy93/dashy/commit/3da76ce2999f57f76a97454c0276301e39957b8e)
0 commit comments