Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug dump page #51

Merged
merged 14 commits into from
Aug 19, 2021
69 changes: 69 additions & 0 deletions components/CollapseMessage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<template>
<b-collapse
:class="collapseClass"
:open.sync="open">
<template #trigger="props">
<div
class="message-header"
role="button">
<p>
<slot name="title">Message</slot>
</p>
<fa-icon
pack="fas"
:icon="props.open ? 'chevron-up' : 'chevron-down'" />
</div>
</template>

<div :class="contentClass">
<slot></slot>
</div>
</b-collapse>
</template>

<script>
export default {
props: {
type: {
type: String,
required: false,
default: ""
},
padding: {
type: Number,
required: false,
default: 4
}
},
data() {
return {
open: false,
}
},
methods: {
setOpen(value) {
this.open = open
}
},
computed: {
collapseClass() {
return {
message: true,
[this.type]: true,
open: this.open,
}
},
contentClass() {
return {
[`p-${this.padding}`]: true
}
}
}
}
</script>

<style scoped>
.message:not(.open) .message-header {
border-radius: 4px;
}
</style>
Loading