Skip to content

Commit

Permalink
Icon properties: show "import { mdiAccount } from '@mdi/js';" version…
Browse files Browse the repository at this point in the history
… too
  • Loading branch information
quentin-st committed Sep 27, 2019
1 parent e5c2159 commit 1cb37b9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
20 changes: 12 additions & 8 deletions src/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ body {
color: $color-text-dark;

cursor: default;
-webkit-user-select: none;
user-select: none;
}

* {
Expand Down Expand Up @@ -215,7 +215,7 @@ header.header {
text-align: center;
font-size: 19px;
cursor: default;
-webkit-user-select: none;
user-select: none;
opacity: 0.6;

i {
Expand Down Expand Up @@ -310,16 +310,19 @@ header.header {
align-items: center;
border-radius: 10px 10px 0 0;

$icon-size: 56px;
$icon-margin-l: 5px;
$icon-margin-r: 20px;

.icon-icon {
$icon-size: 1.6em;
width: $icon-size;
height: $icon-size;
flex-shrink: 0;
text-align: center;
color: $icons-color-hover;
line-height: $icon-size;
font-size: 35px;
margin: 5px 20px 5px 5px;
margin: 5px $icon-margin-r 5px $icon-margin-l;
border-radius: 50%;
transition-duration: $timing-short;
}
Expand All @@ -330,12 +333,13 @@ header.header {

.properties {
flex-grow: 1;
width: calc(100% - #{$icon-size + $icon-margin-l + $icon-margin-r});

.icon-name {
font-size: 20px;
margin-top: 5px;
}
.icon-class {
.icon-usage {
display: block;
font-family: monospace;
white-space: pre;
Expand All @@ -353,8 +357,8 @@ header.header {
@extend .elevation-negative;
}

.icon-name, .icon-class {
-webkit-user-select: text;
.icon-name, .icon-usage {
user-select: text;
}

.icon-more {
Expand All @@ -363,7 +367,7 @@ header.header {
margin-bottom: 8px;

.icon-codepoint, .icon-version, .icon-author {
-webkit-user-select: text;
user-select: text;
}
}
}
Expand Down
10 changes: 9 additions & 1 deletion src/js/vue/IconsPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,15 @@
</overflow-menu>

<div class="icon-name">{{ activeIcon && activeIcon.name }}</div>
<div class="icon-class">{{ activeIcon && activeIcon.class }}</div>
<div class="icon-usage">{{ activeIcon && activeIcon.class }}</div>
<div class="icon-usage">
<span style="color: #c084ba">import</span>
<span style="color: #ffffff">{</span>
<span style="color: #9ddcfc">mdi{{ activeIcon && activeIcon.name.split('-').map((name) => name.charAt(0).toUpperCase() + name.slice(1)).join('') }}</span>
<span style="color: #ffffff">}</span>
<span style="color: #c084ba">from</span>
<span style="color: #cd917b">'@mdi/js'</span><span style="color: #ffffff">;</span>
</div>
<div class="icon-more">
<span class="icon-codepoint">{{ activeIcon && activeIcon.codepoint }}</span>
<span
Expand Down

0 comments on commit 1cb37b9

Please sign in to comment.