Skip to content

Component config variants #1806

Closed
Closed
@asvae

Description

@asvae

Useage example

<va-button variant="buy" />

<va-button variant="cancel" />

We want to make user be able to create component from some kind of presets.

User should be able to define varians in global config

createVuestic({
   config: {
      components: {
         VaButton: {
             variants: {
                buy: {
                   color: '#0fe',
                   icon: 'money',
                   gradient: true,
                   
                   class: 'buy-button'
                },
                cancel: {
                   color: 'secondary',
                   flat: true,
                }
             }
         }
      }
   }
})

https://www.notion.so/epicmax/b1b5f6118bde486fb72b88fa932249ea

See also #1527
and #1856

Metadata

Metadata

Assignees

Labels

epicFeature that is too big to fit in one issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions