Created
August 24, 2019 16:36
-
-
Save cannap/f6e4a07a9fbb6b85bf8bab1a505d3460 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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