updated buttons
This commit is contained in:
45
src/components/buttons/BaseButton.vue
Normal file
45
src/components/buttons/BaseButton.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<button
|
||||
class="btn"
|
||||
:class="{ 'btn-reverse': isReverse }"
|
||||
title="Wyślij wiadomość"
|
||||
>
|
||||
<font-awesome-icon
|
||||
v-if="hasIcon && icon"
|
||||
class="icon"
|
||||
:icon="icon"
|
||||
/>
|
||||
<slot />
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineProps } from 'vue'
|
||||
|
||||
defineProps({
|
||||
hasIcon: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
isReverse: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../scss/btn";
|
||||
|
||||
.btn {
|
||||
@include button($has-icon: true);
|
||||
}
|
||||
|
||||
.btn-reverse {
|
||||
@include button(true, true);
|
||||
}
|
||||
</style>
|
33
src/components/buttons/GhostButton.vue
Normal file
33
src/components/buttons/GhostButton.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<button class="btn">
|
||||
<font-awesome-icon
|
||||
v-if="hasIcon && icon"
|
||||
class="icon"
|
||||
:icon="icon"
|
||||
/>
|
||||
<slot />
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineProps } from 'vue'
|
||||
|
||||
defineProps({
|
||||
hasIcon: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../scss/btn";
|
||||
|
||||
.btn {
|
||||
@include ghost-button();
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user