UNPKG

@gitlab/ui

Version:
68 lines (57 loc) 2.34 kB
import GlIcon from '../icon/icon'; import { colorThemes } from '../../../utils/constants'; import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js'; var script = { components: { GlIcon: GlIcon }, props: { iconName: { type: String, required: false, default: 'bullhorn' }, dismissLabel: { type: String, required: false, default: 'Dismiss' }, theme: { type: String, required: false, default: Object.keys(colorThemes)[0], validator: function validator(value) { return Object.keys(colorThemes).includes(value); } } } }; /* script */ const __vue_script__ = script; /* template */ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-broadcast-message",class:_vm.theme,attrs:{"role":"alert"}},[_c('div',{staticClass:"gl-broadcast-message-content"},[_c('div',{staticClass:"gl-broadcast-message-icon"},[_c('gl-icon',{attrs:{"name":_vm.iconName}})],1),_vm._v(" "),_c('div',{staticClass:"gl-broadcast-message-text"},[_vm._t("default")],2)]),_vm._v(" "),_c('footer',{staticClass:"gl-broadcast-message-footer"},[_c('button',{ref:"dismiss",staticClass:"gl-broadcast-message-dismiss",attrs:{"type":"button","aria-label":_vm.dismissLabel},on:{"click":function($event){return _vm.$emit('dismiss')}}},[_c('gl-icon',{staticClass:"gl-broadcast-message-dismiss-icon",attrs:{"name":"close"}}),_vm._v(" "),_c('span',{staticClass:"gl-broadcast-message-dismiss-label"},[_vm._v(_vm._s(_vm.dismissLabel))])],1)])])}; var __vue_staticRenderFns__ = []; /* style */ const __vue_inject_styles__ = undefined; /* scoped */ const __vue_scope_id__ = undefined; /* module identifier */ const __vue_module_identifier__ = undefined; /* functional template */ const __vue_is_functional_template__ = false; /* style inject */ /* style inject SSR */ /* style inject shadow dom */ const __vue_component__ = __vue_normalize__( { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined ); export default __vue_component__;