Skip to content

Commit 0271c5c

Browse files
committed
feature: update ui and placeholder
1 parent 504f63a commit 0271c5c

File tree

2 files changed

+37
-8
lines changed

2 files changed

+37
-8
lines changed

src/App.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ import HelloWorld from './components/HelloWorld.vue'
1010
</template>
1111

1212
<style>
13+
:root {
14+
--primaryFont: Avenir, Helvetica, Arial, sans-serif;
15+
}
16+
1317
#app {
14-
font-family: Avenir, Helvetica, Arial, sans-serif;
18+
font-family: var(--primaryFont);
1519
-webkit-font-smoothing: antialiased;
1620
-moz-osx-font-smoothing: grayscale;
1721
text-align: center;

src/components/HelloWorld.vue

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ defineProps({
66
})
77
88
const data = reactive({
9-
name: 'Ben',
10-
email: 'ben@bencodezen.io',
11-
message: 'Test Message'
9+
name: '',
10+
email: '',
11+
message: ''
1212
})
1313
1414
const elFeedbackForm = ref(null)
@@ -46,17 +46,31 @@ const submitForm = () => {
4646

4747
<div class="input-wrapper">
4848
<label for="name">Name</label>
49-
<input id="name" v-model="data.name" type="text" />
49+
<input
50+
id="name"
51+
v-model="data.name"
52+
type="text"
53+
placeholder="Your Name"
54+
/>
5055
</div>
5156

5257
<div class="input-wrapper">
5358
<label for="email">Email</label>
54-
<input id="email" v-model="data.email" type="email" />
59+
<input
60+
id="email"
61+
v-model="data.email"
62+
type="email"
63+
placeholder="yourname@domain.extension"
64+
/>
5565
</div>
5666

5767
<div class="input-wrapper">
5868
<label for="message">Message</label>
59-
<textarea id="message" v-model="data.message"></textarea>
69+
<textarea
70+
id="message"
71+
v-model="data.message"
72+
placeholder="What would you like to share?"
73+
/>
6074
</div>
6175

6276
<button type="submit" @click="submitForm">Submit</button>
@@ -85,12 +99,23 @@ a {
8599
margin-bottom: 0;
86100
}
87101
102+
.input-wrapper input,
103+
.input-wrapper textarea {
104+
font-family: var(--primaryFont);
105+
}
106+
88107
.input-wrapper input {
89108
padding: 10px;
90-
font-size: 1rem;
109+
font-size: 0.9rem;
91110
}
92111
93112
.input-wrapper textarea {
94113
height: 100px;
114+
padding: 10px;
115+
font-size: 0.9rem;
116+
}
117+
118+
button {
119+
padding: 8px 16px;
95120
}
96121
</style>

0 commit comments

Comments
 (0)