-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from gastongaiduk/shared-components
Shared components
- Loading branch information
Showing
10 changed files
with
101 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script setup lang="ts"> | ||
import {useRouter} from "vue-router"; | ||
const router = useRouter(); | ||
function goBack() { | ||
router.back(); | ||
} | ||
</script> | ||
|
||
<template> | ||
<button class="back-button" @click="goBack"><i class="fa fa-arrow-left" aria-hidden="true"></i> Back</button> | ||
</template> | ||
|
||
<style scoped> | ||
.back-button { | ||
background-color: #f5a623; | ||
color: #1a1a2e; | ||
border: none; | ||
padding: 10px 20px; | ||
cursor: pointer; | ||
font-size: 16px; | ||
border-radius: 10px; | ||
} | ||
.back-button:hover { | ||
background-color: #d48821; | ||
} | ||
</style> |
2 changes: 1 addition & 1 deletion
2
src/components/BurgerMenu.vue → src/components/_shared/BurgerMenu.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<script setup lang="ts"> | ||
import Tooltip from "./Tooltip.vue"; | ||
import {ref} from "vue"; | ||
const emit = defineEmits(['click']) | ||
const props = defineProps({ | ||
loadingState: { | ||
type: Boolean, | ||
required: true | ||
}, | ||
}) | ||
const loading = ref<boolean>(false); | ||
function clickAction() { | ||
loading.value = true; | ||
setTimeout(() => { | ||
loading.value = false; | ||
emit('click'); | ||
}, 1000); | ||
} | ||
</script> | ||
|
||
<template> | ||
<Tooltip text="Refresh content" position="left" style="float: right"> | ||
<button class="refresh-button" @click="clickAction" :disabled="props.loadingState || loading"> | ||
<i v-if="props.loadingState || loading" class="fa fa-spinner fa-spin"></i> | ||
<i v-else class="fa fa-refresh"></i> | ||
</button> | ||
</Tooltip> | ||
</template> | ||
|
||
<style scoped> | ||
.refresh-button { | ||
background-color: #f5a623; | ||
color: #1a1a2e; | ||
border: none; | ||
padding: 10px 20px; | ||
cursor: pointer; | ||
font-size: 16px; | ||
border-radius: 10px; | ||
} | ||
.refresh-button:hover { | ||
background-color: #d48821; | ||
} | ||
.refresh-button { | ||
float: right; | ||
} | ||
</style> |
File renamed without changes.