mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
add variant prop to Icon
This commit is contained in:
parent
dcb9534e77
commit
7f5392389e
1 changed files with 23 additions and 2 deletions
|
@ -1,12 +1,13 @@
|
|||
<template>
|
||||
<span :class="'icon fa fa-' + iname" aria-hidden="true" />
|
||||
<span :class="['icon fa fa-' + iname, variant ? 'variant ' + variant : '']" aria-hidden="true" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Icon',
|
||||
props: {
|
||||
iname: { type: String, required: true }
|
||||
iname: { type: String, required: true },
|
||||
variant: { type: String, default: null }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -26,5 +27,25 @@ export default {
|
|||
&.fs-sm {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
&.variant {
|
||||
font-size: .8rem;
|
||||
width: 1.35rem;
|
||||
min-width: 1.35rem;
|
||||
height: 1.35rem;
|
||||
line-height: 165%;
|
||||
border-radius: 50rem;
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
&.#{$color} {
|
||||
background-color: $value;
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
&.warning {
|
||||
color: $black;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Add table
Reference in a new issue