28 lines
1.2 KiB
Vue
28 lines
1.2 KiB
Vue
<script setup lang="ts">
|
|
defineProps<{
|
|
size?: string | number;
|
|
color?: boolean;
|
|
avatar?: boolean;
|
|
}>();
|
|
|
|
const TITLE = 'Microsoft';
|
|
|
|
const BACKGROUND_COLOR = "#2468f2";
|
|
const AVATAR_SCALE = 0.6;
|
|
</script>
|
|
|
|
<template>
|
|
<div class="inline-flex items-center justify-center"
|
|
:style="[`width: ${size}px; height: ${size}px;`, avatar ? `background-color: ${BACKGROUND_COLOR}; border-radius: 0.375rem;` : '']">
|
|
<svg :fill="avatar ? 'currentColor' : ''" fill-rule="evenodd" :height="size" style="flex: none; line-height: 1;"
|
|
:style="[`width: ${size}px; height: ${size}px; flex: none; line-height: 1;`, avatar ? `transform: scale(${AVATAR_SCALE});` : '']"
|
|
viewBox="0 0 24 24" :width="size" xmlns="http://www.w3.org/2000/svg">
|
|
<title>{{ TITLE }}</title>
|
|
<path d="M11.49 2H2v9.492h9.492V2h-.002z" :fill="!avatar && color ? '#F25022' : ''" />
|
|
<path d="M22 2h-9.492v9.492H22V2z" :fill="!avatar && color ? '#7FBA00' : ''" />
|
|
<path d="M11.49 12.508H2V22h9.492v-9.492h-.002z" :fill="!avatar && color ? '#00A4EF' : ''" />
|
|
<path d="M22 12.508h-9.492V22H22v-9.492z" :fill="!avatar && color ? '#FFB900' : ''" />
|
|
</svg>
|
|
</div>
|
|
</template>
|