Skip to content

Commit bebce5e

Browse files
committed
docs(icon-fonts): update page content and structure
also added a link from learn menu to mdi icon search
1 parent 604dade commit bebce5e

File tree

5 files changed

+199
-83
lines changed

5 files changed

+199
-83
lines changed

packages/docs/src/components/app/bar/LearnMenu.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
to: rpath('/introduction/why-vuetify/#feature-guides'),
4848
appendIcon: 'mdi-lightbulb-on-outline',
4949
},
50+
{
51+
title: t('icons'),
52+
to: rpath('/features/icon-fonts/#mdi-icons-search'),
53+
appendIcon: 'mdi-emoticon-outline',
54+
},
5055
{
5156
title: t('labs'),
5257
to: rpath('/labs/introduction/'),

packages/docs/src/components/doc/IconList.vue

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
v-model="selection"
44
v-model:search="search"
55
:items="filteredIcons"
6+
:item-props="itemProps"
7+
:placeholder="t('search.icons')"
68
item-title="name"
79
item-value="name"
8-
placeholder="Search for icons (e.g. account, close)"
9-
:item-props="itemProps"
1010
no-filter
11+
variant="outlined"
1112
>
1213
<template #prepend-inner>
1314
<v-expand-x-transition>
14-
<v-icon v-if="selection" color="primary" start>
15+
<v-icon v-if="selection" start>
1516
{{ getIcon(selection) }}
1617
</v-icon>
1718
</v-expand-x-transition>
19+
1820
<code class="me-n1">mdi-</code>
1921
</template>
2022

@@ -23,9 +25,9 @@
2325
<template #append>
2426
<v-btn
2527
icon="mdi-content-copy"
26-
variant="plain"
2728
size="small"
28-
@click="copy(item.raw.name)"
29+
variant="plain"
30+
@click.stop="copy(item.raw.name)"
2931
/>
3032
</template>
3133
</v-list-item>
@@ -34,22 +36,30 @@
3436
<template #append-inner>
3537
<v-expand-x-transition>
3638
<span v-if="copied" class="text-primary pt-1">
37-
Copied
39+
{{ t('copied') }}
3840
</span>
3941
</v-expand-x-transition>
4042
</template>
4143
</v-autocomplete>
4244
</template>
4345

4446
<script setup>
47+
// Composables
48+
import { useI18n } from 'vue-i18n'
49+
50+
// Utilities
51+
import { camelize, computed, shallowRef, watch } from 'vue'
52+
import { distance } from '@/util/helpers'
53+
54+
// Data
4555
import icons from '@mdi/svg/meta.json'
4656
import * as paths from '@mdi/js'
47-
import { distance } from '@/util/helpers'
48-
import { camelize, computed, ref, watch } from 'vue'
4957
50-
const copied = ref(false)
51-
const selection = ref()
52-
const search = ref('')
58+
const { t } = useI18n()
59+
60+
const copied = shallowRef(false)
61+
const selection = shallowRef()
62+
const search = shallowRef('')
5363
const filteredIcons = computed(() => {
5464
if (!search.value) return icons
5565

packages/docs/src/i18n/messages/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@
168168
"hide-source": "Hide source",
169169
"homepage": "Vuetify Home Page",
170170
"icon": "Icon",
171+
"icons": "Icons",
171172
"images-and-icons": "Images & icons",
172173
"inline": "Inline",
173174
"introduction": "Introduction",
@@ -255,6 +256,7 @@
255256
"scroll-to-top": "Scroll to top",
256257
"sass-variables": "SASS Variables",
257258
"search": {
259+
"icons": "Search for icons (e.g. account, close)",
258260
"label": "Search",
259261
"looking": "Looking for",
260262
"key-hint": "Ctrl+K",

0 commit comments

Comments
 (0)