add a NewFriend component

This commit is contained in:
Andreas Zweili 2021-02-01 20:33:28 +01:00
parent c236e653e5
commit cdc3c2f42f
3 changed files with 25 additions and 1 deletions

View File

@ -1,6 +1,7 @@
<template>
<div>
<header><h1>My Friends</h1></header>
<new-friend></new-friend>
<ul>
<friend-contact
v-for="friend in friends"

View File

@ -0,0 +1,21 @@
<template>
<form>
<div>
<label>Name: </label>
<input type="text" />
</div>
<div>
<label>Phone: </label>
<input type="tel" />
</div>
<div>
<label>Email: </label>
<input type="email" />
</div>
<div><button>Add Contact</button></div>
</form>
</template>
<script>
export default {};
</script>

View File

@ -1,10 +1,12 @@
import { createApp } from "vue";
import App from "./App.vue";
import FriendContact from "./components/FriendContact";
import FriendContact from "./components/FriendContact.vue";
import NewFriend from "./components/NewFriend.vue";
const app = createApp(App);
app.component("friend-contact", FriendContact);
app.component("new-friend", NewFriend);
app.mount("#app");