mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-01-23 06:38:34 +01:00
New vuejs Button component
This commit is contained in:
parent
aef68df370
commit
38288332c5
2
resources/js/app.js
vendored
2
resources/js/app.js
vendored
@ -15,6 +15,7 @@ import Edit from './views/Edit'
|
||||
import PasswordRequest from './views/auth/password/Request'
|
||||
import PasswordReset from './views/auth/password/Reset'
|
||||
import NotFound from './views/Error'
|
||||
import Button from './components/Button'
|
||||
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
@ -24,6 +25,7 @@ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
||||
library.add(faPlus, faQrcode, faImage, faTrash, faEdit, faCheck, faLock, faLockOpen, faSearch);
|
||||
|
||||
Vue.component('font-awesome-icon', FontAwesomeIcon)
|
||||
Vue.component('VButton', Button)
|
||||
|
||||
// const lang = document.documentElement.lang.substr(0, 2);
|
||||
const lang = 'en';
|
||||
|
41
resources/js/components/Button.vue
Normal file
41
resources/js/components/Button.vue
Normal file
@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<button
|
||||
:type="nativeType"
|
||||
:class="{
|
||||
[`${color}`]: true,
|
||||
'is-large': isLarge,
|
||||
'is-focused': isFocused,
|
||||
}"
|
||||
class="button">
|
||||
<slot />
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'VButton',
|
||||
|
||||
props: {
|
||||
color: {
|
||||
type: String,
|
||||
default: 'is-link'
|
||||
},
|
||||
|
||||
nativeType: {
|
||||
type: String,
|
||||
default: 'submit'
|
||||
},
|
||||
|
||||
isFocused: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
isLarge: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user