64 lines
852 B
Vue
64 lines
852 B
Vue
<template>
|
|
<div class="menu-row">
|
|
<h2
|
|
@click="isHidden = !isHidden"
|
|
>
|
|
{{ rowTitle }}
|
|
</h2>
|
|
<div
|
|
v-if="!isHidden"
|
|
class="menu-row-content"
|
|
>
|
|
<slot />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'MenuRow',
|
|
props: {
|
|
rowTitle: {
|
|
type: String,
|
|
default : ''
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
isHidden: true
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
.menu-row h2 {
|
|
font-size: medium;
|
|
padding: 10px;
|
|
cursor: pointer;
|
|
border: 2px solid darkgrey;
|
|
margin: 0 0 10px 0;
|
|
}
|
|
|
|
input[type="button"] {
|
|
min-width: 60px;
|
|
padding: 5px;
|
|
font-weight: bold;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.form-field {
|
|
display: flex;
|
|
margin: 10px;
|
|
}
|
|
|
|
.menu-row {
|
|
flex: 1;
|
|
}
|
|
|
|
label, .form-field label {
|
|
margin-right: 10px;
|
|
font-weight: bold;
|
|
}
|
|
</style>
|