mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-12 07:56:50 +02: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 PasswordRequest from './views/auth/password/Request'
|
||||||
import PasswordReset from './views/auth/password/Reset'
|
import PasswordReset from './views/auth/password/Reset'
|
||||||
import NotFound from './views/Error'
|
import NotFound from './views/Error'
|
||||||
|
import Button from './components/Button'
|
||||||
|
|
||||||
|
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
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);
|
library.add(faPlus, faQrcode, faImage, faTrash, faEdit, faCheck, faLock, faLockOpen, faSearch);
|
||||||
|
|
||||||
Vue.component('font-awesome-icon', FontAwesomeIcon)
|
Vue.component('font-awesome-icon', FontAwesomeIcon)
|
||||||
|
Vue.component('VButton', Button)
|
||||||
|
|
||||||
// const lang = document.documentElement.lang.substr(0, 2);
|
// const lang = document.documentElement.lang.substr(0, 2);
|
||||||
const lang = 'en';
|
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…
x
Reference in New Issue
Block a user