explorata/src/components/MenuRow.vue

64 lines
852 B
Vue
Raw Normal View History

2022-01-08 13:12:15 +01:00
<template>
<div class="menu-row">
<h2
@click="isHidden = !isHidden"
>
{{ rowTitle }}
</h2>
<div
v-if="!isHidden"
class="menu-row-content"
>
<slot />
</div>
2022-01-08 13:12:15 +01:00
</div>
</template>
<script>
export default {
name: 'MenuRow',
props: {
rowTitle: {
type: String,
default : ''
}
2022-01-08 13:12:15 +01:00
},
data() {
return {
isHidden: true
}
}
}
</script>
<style>
2022-01-01 14:07:34 +01:00
.menu-row h2 {
font-size: medium;
padding: 10px;
cursor: pointer;
border: 2px solid darkgrey;
margin: 0 0 10px 0;
2022-01-08 13:12:15 +01:00
}
2022-01-01 14:07:34 +01:00
input[type="button"] {
min-width: 60px;
padding: 5px;
font-weight: bold;
2022-01-02 16:45:03 +01:00
margin-right: 10px;
2022-01-01 14:07:34 +01:00
}
.form-field {
display: flex;
margin: 10px;
}
.menu-row {
flex: 1;
}
label, .form-field label {
margin-right: 10px;
font-weight: bold;
}
2022-01-08 13:12:15 +01:00
</style>