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

Feat #1806: Presets for all components & components config structure change #1921

Merged
merged 3 commits into from
Jun 21, 2022

Conversation

Derranion
Copy link
Member

@Derranion Derranion commented Jun 7, 2022

Description

  • New feature - Presets has been added to all usable components.
  • Configs demo has been updated as well to make it clearer.

Closes #1806
Closes #1967

We can use preset prop everywhere to have as many props as we want, at once, in a single word.

Also it is possible to set this inside the Va-config (local config) and Global config (components \ componentsAll).

Usage example is under the spoiler.

<va-card preset="highlightTop">

const cardPreset = {
  highlightTop: {
    square: true,
    outlined: true,
    stripe: true,
  },
}

// Any set method
mergeGlobalConfig({ componentsPresets: { VaCard: cardPreset },

Demo:
presetsDemo

Documentation is in the other pull request.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)

Copy link
Member

@asvae asvae left a comment

Choose a reason for hiding this comment

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

Looks awesome. Thanks!

I believe this would be a huge asset for internal (picker, tables) and external component usage.

@m0ksem m0ksem changed the base branch from develop to release/1.5.0 June 16, 2022 11:20
@m0ksem m0ksem added this to the 1.5.0 milestone Jun 16, 2022
@m0ksem m0ksem added the feature Something useful to end user label Jun 16, 2022
@Derranion Derranion force-pushed the feat/component-presets branch from 8a7057a to a2be91e Compare June 21, 2022 16:16
@Derranion Derranion changed the title Feat #1806: Presets for all components Feat #1806: Presets for all components & components config structure change Jun 21, 2022
@Derranion Derranion merged commit 86776d6 into epicmaxco:release/1.5.0 Jun 21, 2022
@Derranion Derranion mentioned this pull request Aug 7, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something useful to end user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Component config variants
6 participants