2018-10-09 14:07:28 -07:00
|
|
|
<template>
|
2018-11-14 08:39:17 -08:00
|
|
|
<span v-if="contrast" class="contrast-ratio">
|
2018-11-13 05:30:01 -08:00
|
|
|
<span :title="`Contrast is ${contrast.text}`" class="rating">
|
|
|
|
<span v-if="contrast.aaa">
|
|
|
|
<i class="icon-thumbs-up-alt"/>
|
|
|
|
</span>
|
|
|
|
<span v-if="!contrast.aaa && contrast.aa">
|
|
|
|
<i class="icon-adjust"/>
|
2018-10-09 14:07:28 -07:00
|
|
|
</span>
|
2018-11-13 05:30:01 -08:00
|
|
|
<span v-if="!contrast.aaa && !contrast.aa">
|
|
|
|
<i class="icon-attention"/>
|
2018-10-09 14:07:28 -07:00
|
|
|
</span>
|
|
|
|
</span>
|
2018-11-14 08:39:17 -08:00
|
|
|
<span class="rating" v-if="contrast && large" :title="`Contrast is ${contrast.text} (18pt+)`">
|
2018-11-13 05:30:01 -08:00
|
|
|
<span v-if="contrast.aaa">
|
|
|
|
<i class="icon-thumbs-up-alt"/>
|
|
|
|
</span>
|
|
|
|
<span v-if="!contrast.aaa && contrast.aa">
|
|
|
|
<i class="icon-adjust"/>
|
2018-10-09 14:07:28 -07:00
|
|
|
</span>
|
2018-11-13 05:30:01 -08:00
|
|
|
<span v-if="!contrast.aaa && !contrast.aa">
|
|
|
|
<i class="icon-attention"/>
|
2018-10-09 14:07:28 -07:00
|
|
|
</span>
|
|
|
|
</span>
|
2018-11-13 05:30:01 -08:00
|
|
|
</span>
|
2018-10-09 14:07:28 -07:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: [
|
|
|
|
'large', 'contrast'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.contrast-ratio {
|
|
|
|
display: flex;
|
2018-11-14 11:20:42 -08:00
|
|
|
justify-content: flex-end;
|
2018-10-09 14:07:28 -07:00
|
|
|
|
|
|
|
.label {
|
|
|
|
margin-right: 1em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.rating {
|
|
|
|
display: inline-block;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|