Skip to content

docs: add notice that user needs to update aliases when adding new font #4331

Closed
@ellie-me

Description

@ellie-me

Overview of the problem

I was trying to use a different icon library by changing the vuestic configuration as in the documentation, I disabled the material design icons because I don't want to use them in my project and wanted to work with phosphor icons instead. I did changed my config as follows:

{
fonts: [{
  name: "ph-{name}",
  resolve: ({name}) => ({
    class: `ph-regular ph-${name}`,
    tag: "i" })
  },
]

But then, when I was working with the VaInput component I found something odd: the form input was showing a red text on error instead of an icon from the phosphor library that I have setup previously.
I tried searching for props in the input component but I was a bit disappointed to find that there was no error or warning icon name options.

Upon inspecting the code I found the culprit here:

<va-icon
v-if="success"
color="success"
name="va-check-circle"
class="va-input-wrapper__icon va-input-wrapper__icon--success"
/>
<va-icon
v-if="error"
color="danger"
name="va-warning"
class="va-input-wrapper__icon va-input-wrapper__icon--error"
/>
<va-icon
v-if="$props.loading"
:color="$props.color"
name="va-loading"
spin="counter-clockwise"
class="va-input-wrapper__icon va-input-wrapper__icon--loading"
/>

Possible Solutions

It's easy to solve:
Add warningIconName, successIconName, loadingIconName as a prop on VaInput and pass it down to the VaInputWrapper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docspackages/docsgood first issueRight issue if you're new to vuestic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions