This repository has been archived on 2025-10-03. 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-uis/src/components/Application/ApplicationDisplaySwitcher.vue

23 lines
981 B
Vue

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