Skip to content

Commit

Permalink
Styles update (#10)
Browse files Browse the repository at this point in the history
* fix: complex button styles

* fix: optimize button styles

* fix: round button styles

* fix: recent route list styles

* fix: Scan QR code -> Scan QR
  • Loading branch information
nogorka authored May 15, 2024
1 parent ec0083a commit ca61467
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
11 changes: 8 additions & 3 deletions src/components/complex-button.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<template>
<div class="flex gap-2">
<span :class="props.icon"></span>
<router-link :to="props.to" class="btn"> <slot /></router-link>
<div class="flex items-center gap-2 px-4 py-2 rounded hover:bg-gray-200 transition">
<i :class="['pi', props.icon, 'text-xl']"></i>
<router-link
:to="props.to"
class="flex items-center btn"
>
<slot />
</router-link>
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion src/components/optimize-route-button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const onClick = async () => {
<template>
<button
type="button"
class="mt-4 w-full border-2 border-blue-500 text-blue-500 py-2 rounded hover:bg-blue-500 hover:text-white focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50"
class="mt-4 w-full border-2 border-blue-500 text-blue-500 py-2 rounded hover:bg-blue-500 hover:text-white focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 flex items-center justify-center"
@click="onClick"
>
Optimize route
Expand Down
2 changes: 1 addition & 1 deletion src/components/recent-route-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const getDateString = (dateString) => {
<hr class="mb-4">
<ul class="space-y-2">
<li v-for="route in store.state.recentRoutes" :key="route._id"
class="p-4 bg-gray-100 rounded-lg shadow hover:bg-gray-200 transition-colors duration-300">
class="p-4 rounded-lg border-2 border-gray-200 hover:bg-gray-200 transition-colors duration-300">
<div class="flex justify-between items-center">
<router-link :to="getRouteTo(route._id)" class="text-blue-500 hover:underline">
{{ getRouteString(route._id) }}
Expand Down
4 changes: 2 additions & 2 deletions src/components/round-button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ const props = defineProps({
const emits = defineEmits(['clickCallback'])
const buttonClasses = computed(() =>
`${props.position} fixed bg-blue-500 text-white p-2 rounded-full shadow-lg z-[9999] min-w-10 min-h-10`)
`${props.position} fixed bg-blue-500 text-white p-4 rounded-full shadow-lg z-[9999] flex items-center justify-center w-12 h-12`
)
</script>
2 changes: 1 addition & 1 deletion src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import RecentRouteList from '@/components/recent-route-list.vue'
<div class="flex justify-center gap-4">
<complex-button icon="pi pi-table" to="/import-file">Import File</complex-button>
<complex-button icon="pi pi-search" to="/">Input Manually</complex-button>
<complex-button icon="pi pi-qrcode" to="/scan-qr">Scan QR Code</complex-button>
<complex-button icon="pi pi-qrcode" to="/scan-qr">Scan QR</complex-button>
</div>
</div>
<recent-route-list />
Expand Down
2 changes: 1 addition & 1 deletion src/views/MapDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</div>

<round-button
position="bottom-4 right-4"
position="bottom-2 right-4"
icon-class="pi pi-cog"
@clickCallback="changeMapSummaryVisibility(true)"
/>
Expand Down

0 comments on commit ca61467

Please sign in to comment.