Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change icon service & VIcon component #23

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Change icon service & VIcon component #23

wants to merge 4 commits into from

Conversation

nekosaur
Copy link
Member

@nekosaur nekosaur changed the title Refactor icon service & VIcon component Change icon service & VIcon component Dec 13, 2020
},
})

// <v-icon type="mdi" icon="$mycustomicon" />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be set="mdi"? (below as well)

@glen-84
Copy link

glen-84 commented Dec 26, 2020

Is there a better name than values for the mapped icons?

Maybe the top-level option could be named iconSets, and the list of mapped icons could be icons:

createVuetify({
  iconSets: {
    mdi: {
      icons: {
        mycustomicon: 'mdi-foo',
      },
    },
  },
})

Other alternatives (with icons at the top level) might be items, mappedIcons, and aliases.

Would there be a default set, so that users using a single set would not need to specify it for every use of the icon component?

@nekosaur
Copy link
Member Author

Is there a better name than values for the mapped icons?

Maybe the top-level option could be named iconSets, and the list of mapped icons could be icons:

createVuetify({
  iconSets: {
    mdi: {
      icons: {
        mycustomicon: 'mdi-foo',
      },
    },
  },
})

Other alternatives (with icons at the top level) might be items, mappedIcons, and aliases.

Would there be a default set, so that users using a single set would not need to specify it for every use of the icon component?

icons/aliases is pretty good. using icons for the inner object opens it up for confusion since users might think that all icons they use in an app must be declared there. aliases is much better since that's exactly what it is.

In regards to default set, that can be defined globally for the prop using globals section in options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants