Skip to content

Instantly share code, notes, and snippets.

@cannap
Created August 24, 2019 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cannap/f6e4a07a9fbb6b85bf8bab1a505d3460 to your computer and use it in GitHub Desktop.
Save cannap/f6e4a07a9fbb6b85bf8bab1a505d3460 to your computer and use it in GitHub Desktop.
<template functional>
<div class="number">
<div class="number__inner">
<div class="number__holder">{{ number }}</div>
</div>
</div>
</template>
<script>
export default {
name: 'CircleNumber',
props: {
number: {
type: [String, Number],
required: true
}
}
}
</script>
<style lang="scss" scoped>
.number {
border: 1px solid hsla(0, 0%, 100%, 0.6);
width: 50px;
height: 50px;
border-radius: 9999px;
position: absolute;
right: 0;
z-index: 4;
&__inner {
border: 8px solid hsla(0, 0%, 100%, 0.2);
height: 48px;
width: 48px;
border-radius: 9999px;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
}
&__holder {
display: inline-flex;
height: 40px;
width: 40px;
background: #0a3244;
border-radius: 9999px;
font-size: 0.75rem;
justify-content: center;
align-items: center;
text-align: center;
}
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment