Skip to content

Autocomplete icon names #20

Open
Open
@panstromek

Description

@panstromek
  1. Pull all icon names from quasar-extras package
    This is mostly about regexing bunch of css names. Should be pretty straightforward.
  2. Generate fake props in icon component in a form:
export default {
  props: {
    /**
     * This comment will be visible in quick doc
     */
    'name="cancel"':  Boolean ,
  }
}
  1. For all components that use icon prop, generate icon mixin in a form
export default {
  props: {
    'icon="cancel"': Boolean,
  }
}
  1. Generate imports and usage for those in every component that uses icon. Eg
import iconMixin from './iconMixin'
export default {
  name: 'QBtn',
  mixin: [iconMixin]
  props: {
   // ...
  }
}

Questions:

  • Some components use different icon-props (icon-left, icon-right etc.). This will cause combinatorics explosion of generated files. Is it worth it?
  • Maybe it would be better to only generate this only for icon sets that you use (and autoregenerate when you change that)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions