{{ myResults }}
-``` - -**Styling** - -Styles can be written your your widget within the ` -``` - -For examples of finished widget components, see the [Widgets](https://github.com/Lissy93/dashy/tree/master/src/components/Widgets) directory. Specifically, the [`XkcdComic.vue`](https://github.com/Lissy93/dashy/blob/master/src/components/Widgets/XkcdComic.vue) widget is quite minimal, so would make a good example, as will [this example implementation](https://github.com/Lissy93/dashy/commit/3da76ce2999f57f76a97454c0276301e39957b8e). - - -### Step 3 - Register - -Next, import and register your new widget, in [`WidgetBase.vue`](https://github.com/Lissy93/dashy/blob/master/src/components/Widgets/WidgetBase.vue). In this file, you'll need to add the following: - -Import your widget file -```javascript -import ExampleWidget from '@/components/Widgets/ExampleWidget.vue'; -``` - -Then register the component -```javascript -components: { - ... - ExampleWidget, -}, -``` - -Finally, add the markup to render it. The only attribute you need to change here is, setting `widgetType === 'example'` to your widget's name. -```vue -{{ myResults }}
+``` + +**Styling** + +Styles can be written your your widget within the ` +``` + +For examples of finished widget components, see the [Widgets](https://github.com/Lissy93/dashy/tree/master/src/components/Widgets) directory. Specifically, the [`XkcdComic.vue`](https://github.com/Lissy93/dashy/blob/master/src/components/Widgets/XkcdComic.vue) widget is quite minimal, so would make a good example, as will [this example implementation](https://github.com/Lissy93/dashy/commit/3da76ce2999f57f76a97454c0276301e39957b8e). + + +### Step 3 - Register + +Next, import and register your new widget, in [`WidgetBase.vue`](https://github.com/Lissy93/dashy/blob/master/src/components/Widgets/WidgetBase.vue). In this file, you'll need to add the following: + +Import your widget file +```javascript +import ExampleWidget from '@/components/Widgets/ExampleWidget.vue'; +``` + +Then register the component +```javascript +components: { + ... + ExampleWidget, +}, +``` + +Finally, add the markup to render it. The only attribute you need to change here is, setting `widgetType === 'example'` to your widget's name. +```vue +Value of 1 {{ inputCurrency }}
-{{ exchange.currency }}
-{{ exchange.value | applySymbol(inputCurrency) }}
+Value of 1 {{ newInputCurrency || inputCurrency }}
++ ⇦ Reset back to {{ inputCurrency }} +
++ + {{ exchange.currency }} +
++ + {{ 1 | applySymbol(newInputCurrency || inputCurrency) }} = + + {{ exchange.value | applySymbol(exchange.currency) }} +
Updated on {{ lastUpdated }}