PHP Classes

File: src/components/input/InputSection.vue

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   WP Emailer   src/components/input/InputSection.vue   Download  
File: src/components/input/InputSection.vue
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WP Emailer
Allow WordPress users to configure email settings
Author: By
Last change:
Date: 1 year ago
Size: 2,606 bytes
 

Contents

Class file image Download
<template> <div class="wp-emailer-input wp-emailer-form-row"> <div class="wp-emailer-input-label"> <label :for="name"> {{ label }} </label> </div> <div class="wp-emailer-input-content"> <slot name="input-content"> <div class="flex"> <BaseInput :id="name" :name="name" :type="type" :value="value" :placeholder="placeholder" :on-change="onChange" :min="min" :max="max" /> <div> <slot name="input-right" /> </div> </div> <p v-if="hint" class="input-hint" > {{ hint }} </p> </slot> </div> </div> </template> <script> import BaseInput from "./BaseInput.vue"; export default { name: "InputSection", components: { BaseInput, }, props: { label: { type: String, required: true, }, name: { type: String, required: true, }, type: { type: String, required: false, default: "text", }, value: { type: [String, Number, Array], required: false, default: '', }, hint: { type: String, required: false, default: "", }, placeholder: { type: String, required: false, default: "", }, required: { type: Boolean, required: false, default: false, }, onChange: { type: Function, required: false, default: () => {}, }, // eslint-disable-next-line vue/require-default-prop min: { type: Number, required: false, }, // eslint-disable-next-line vue/require-default-prop max: { type: Number, required: false, }, }, }; </script> <style lang="scss" scoped> .wp-emailer-input { display: flex; flex-wrap: wrap; flex-direction: column; label { display: block; margin-bottom: 10px; } } .input-hint { color: var(--color-secondary); margin: 5px 0px; } // Medium screen @media only screen and (min-width: 600px) { .wp-emailer-input { flex-direction: row; .wp-emailer-input-label { flex-basis: 20%; } .wp-emailer-input-content { flex-basis: 80%; max-width: 450px; } } } </style>