Skip to content

Commit

Permalink
backup before implement #51
Browse files Browse the repository at this point in the history
  • Loading branch information
mStirner committed Dec 30, 2022
1 parent c62e0c3 commit f62667b
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/components/Collapsable copy.vue
@@ -0,0 +1,42 @@
<script>
export default {
props: {
collapsed: {
default: false,
type: Boolean,
},
},
computed: {
text() {
return this.collapsed ? "Expand" : "Collapse";
},
},
};
</script>


<template>
<div>
<div class="row">
<div class="col-2">
<h3>
<slot name="title" id="title"></slot>
</h3>
</div>
<div class="col-9">
<hr class="w-100" />
</div>
<div class="col-1">
<button
class="btn btn-outline-primary w-100"
@click="collapsed = !collapsed"
>
{{ text }}
</button>
</div>
</div>
<div class="row" v-show="!collapsed">
<slot></slot>
</div>
</div>
</template>

0 comments on commit f62667b

Please sign in to comment.