node_modules updated, buefy add to lib folder
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
import { shallowMount } from '@vue/test-utils'
|
||||
import BMessage from '@components/message/Message'
|
||||
|
||||
describe('BMessage', () => {
|
||||
it('is called', () => {
|
||||
const wrapper = shallowMount(BMessage)
|
||||
expect(wrapper.name()).toBe('BMessage')
|
||||
expect(wrapper.isVueInstance()).toBeTruthy()
|
||||
})
|
||||
})
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<transition name="fade">
|
||||
<article
|
||||
v-if="isActive"
|
||||
class="message"
|
||||
:class="[type, size]">
|
||||
<header v-if="title" class="message-header">
|
||||
<p>{{ title }}</p>
|
||||
<button
|
||||
v-if="closable"
|
||||
type="button"
|
||||
class="delete"
|
||||
@click="close"
|
||||
:aria-label="ariaCloseLabel"
|
||||
/>
|
||||
</header>
|
||||
<section class="message-body">
|
||||
<div class="media">
|
||||
<div v-if="icon && hasIcon" class="media-left">
|
||||
<b-icon
|
||||
:icon="icon"
|
||||
:pack="iconPack"
|
||||
:class="type"
|
||||
both
|
||||
:size="newIconSize"/>
|
||||
</div>
|
||||
<div class="media-content">
|
||||
<slot/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</article>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MessageMixin from '../../utils/MessageMixin.js'
|
||||
|
||||
export default {
|
||||
name: 'BMessage',
|
||||
mixins: [MessageMixin],
|
||||
props: {
|
||||
ariaCloseLabel: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
newIconSize: this.iconSize || this.size || 'is-large'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import Message from './Message'
|
||||
|
||||
import { use, registerComponent } from '../../utils/plugins'
|
||||
|
||||
const Plugin = {
|
||||
install(Vue) {
|
||||
registerComponent(Vue, Message)
|
||||
}
|
||||
}
|
||||
|
||||
use(Plugin)
|
||||
|
||||
export default Plugin
|
||||
|
||||
export {
|
||||
Message
|
||||
}
|
||||
Reference in New Issue
Block a user