diff --git a/source/_posts/2018-12-27-rebuilding-bartik-with-vuejs-tailwind-css-part-2.md b/source/_posts/2018-12-27-rebuilding-bartik-with-vuejs-tailwind-css-part-2.md index c5c7fda5..6f0cac84 100644 --- a/source/_posts/2018-12-27-rebuilding-bartik-with-vuejs-tailwind-css-part-2.md +++ b/source/_posts/2018-12-27-rebuilding-bartik-with-vuejs-tailwind-css-part-2.md @@ -174,25 +174,45 @@ I added only the page-specific styling classes to the link (as well as the `skip ## Adding the DrupalMessage component -I also added a version of Drupal’s status message. For readability, this is contained within it’s own component, `DrupalMessage.vue`, though it contains only a static template and has no `script` or any of it’s own data. +I also added a version of Drupal’s status message as another Vue component. This also uses a slot to include the message contents and accepts a [prop](https://vuejs.org/v2/guide/components-props.html) for the message type. ```html ``` -I did need to make one change to the `tailwind.js` file - within `modules` I needed to enable the `borderStyle` module for hover and focus states in order for Tailwind to generate the additional classes. +The value of the `type` prop is then used within some computed properties to determine the type specific classes to add (e.g. green for success, and red for warning), as well as whether or not to include the checkmark SVG image. + +```js + +``` +I did need to make one change to the `tailwind.js` file in order to change the border on links when they are hovered over - within `modules` I needed to enable the `borderStyle` module for hover and focus states in order for Tailwind to generate the additional classes. ```js modules: {