diff --git a/cmp-intro-01-starting-setup/app.js b/cmp-intro-01-starting-setup/app.js index 9e2abe5..0bd3a4c 100644 --- a/cmp-intro-01-starting-setup/app.js +++ b/cmp-intro-01-starting-setup/app.js @@ -19,7 +19,20 @@ const app = Vue.createApp({ ], }; }, - methods: {}, +}); + +// use multiword component names +app.component("user-contact", { + data() { + return { + detailsAreVisible: false, + }; + }, + methods: { + toggleDetails() { + this.detailsAreVisible = !this.detailsAreVisible; + }, + }, }); app.mount("#app");