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>
|
<template>
|
||||||
<span :class="'icon fa fa-' + iname" aria-hidden="true" />
|
<span :class="['icon fa fa-' + iname, variant ? 'variant ' + variant : '']" aria-hidden="true" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'Icon',
|
name: 'Icon',
|
||||||
props: {
|
props: {
|
||||||
iname: { type: String, required: true }
|
iname: { type: String, required: true },
|
||||||
|
variant: { type: String, default: null }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -26,5 +27,25 @@ export default {
|
||||||
&.fs-sm {
|
&.fs-sm {
|
||||||
font-size: 1rem;
|
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>
|
</style>
|
||||||
|
|
Loading…
Add table
Reference in a new issue