Skip to content

Instantly share code, notes, and snippets.

@agusnavce
Last active December 20, 2022 14:42
Show Gist options
  • Save agusnavce/ce8bacbbcf0bf1462e2b8c92207e5421 to your computer and use it in GitHub Desktop.
Save agusnavce/ce8bacbbcf0bf1462e2b8c92207e5421 to your computer and use it in GitHub Desktop.
<template>
<div class="input--field">
<p class="input--field-label">
{{ label }}
</p>
<template v-if="!hasFocus && value === ''">
<p class="placeholder">{{ placeholder }}</p>
</template>
<div>
{{value}}
</div>
</div>
</template>
<script>
export default {
name: 'BaseTextareaSpelling',
props: {
value: {
type: [String, Number],
default: '',
},
label: {
type: String,
default: '',
},
placeholder: {
type: String,
default: '',
},
},
data() {
return {};
},
};
</script>
@shaoshuaithe
Copy link

What framework was used to write it

@agusnavce
Copy link
Author

Vue.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment