This repository has been archived on 2025-01-07. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
rebuilding-acquia/src/components/ApplicationSwitcher.vue

36 lines
1 KiB
Vue

<template>
<div>
<div class="bg-grey-lightest rounded overflow-hidden">
<button type="button" class="p-2 focus:outline-none" :class="[mode == 'grid' ? 'bg-blue-light text-white' : 'text-grey-darkest']" @click="changeMode('grid')">
<svg class="h-5 w-5 fill-current"role="presentation"><use xlink:href="/img/icons.symbol.svg#actions__grid"></use></svg>
<span class="hidden">Grid</span>
</button>
<button type="button" class="p-2 focus:outline-none" :class="[mode == 'list' ? 'bg-blue-light text-white' : 'text-grey-darkest']" @click="changeMode('list')">
<svg class="h-5 w-5 fill-current" role="presentation"><use xlink:href="/img/icons.symbol.svg#actions__list"></use></svg>
<span class="hidden">List</span>
</button>
</div>
</div>
</template>
<script>
export default {
props: {
mode: String,
},
// data() {
// return {
// mode: 'grid'
// }
// },
methods: {
changeMode(mode) {
this.mode = mode
this.$emit('display-changed', mode)
}
}
}
</script>