Skip to content

Commit 5c207b7

Browse files
author
TFX-98
committed
feat: update docs (Icon Config)
1 parent aca3543 commit 5c207b7

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const aliases = [
2+
{
3+
name: "va-unsorted",
4+
resolve: () => ({
5+
// Custom class: sort icon is invisible until hovered
6+
class: `fa-solid fa-sort va-icon--hidden-before-hover`,
7+
}),
8+
},
9+
{ name: "va-sort-asc", to: "fa-sort-up" },
10+
{ name: "va-sort-desc", to: "fa-sort-down" },
11+
{ name: "va-arrow-first", to: "fa-backward-step" },
12+
{ name: "va-arrow-last", to: "fa-forward-step" },
13+
{ name: "va-arrow-right", to: "fa-angle-right" },
14+
{ name: "va-arrow-left", to: "fa-angle-left" },
15+
{ name: "va-arrow-down", to: "fa-angle-down" },
16+
{ name: "va-arrow-up", to: "fa-angle-up" },
17+
{ name: "va-calendar", to: "fa-regular fa-calendar" },
18+
{ name: "va-delete", to: "fa-trash" },
19+
{ name: "va-check", to: "fa-check" },
20+
{ name: "va-check-circle", to: "fa-circle-check" },
21+
{ name: "va-warning", to: "fa-triangle-exclamation" },
22+
{ name: "va-clear", to: "fa-regular fa-circle-xmark" },
23+
{ name: "va-close", to: "fa-xmark" },
24+
{ name: "va-loading", to: "fa-solid fa-rotate fa-flip-vertical" },
25+
{ name: "va-plus", to: "fa-plus" },
26+
{ name: "va-minus", to: "fa-minus" },
27+
28+
{ name: "va-unfold-more", to: "fa-sort" },
29+
];

packages/docs/page-config/services/icons-config/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ export default definePageConfig({
6464
block.paragraph("We use some icons in our components by default. You can redefine them by changing it's alias."),
6565
block.component("icon-aliases"),
6666

67+
block.headline("How to redefine default icons"),
68+
block.paragraph("Here's how you can use aliases to redefine default Vuestic icons in case you're using your own icon solution."),
69+
block.code("redefine-icons"),
70+
6771
// setup
6872
block.subtitle("Let's build our config"),
6973
block.paragraph("We need to update icons config in our global config. Icons config is a flat array with Vuestic default font and aliases. We can use the `createIconsConfig()` helper to create a new config with Vuestic defaults and our custom fonts and aliases merged together. For example:"),

0 commit comments

Comments
 (0)