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

chore(atomic): add decorator for bindings #5025

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

chore(atomic): add decorator for bindings #5025

wants to merge 2 commits into from

Conversation

fpbrault
Copy link
Contributor

This PR adds a decorator to provide bindings to component, using @lit/context.

The InitializeBindingsMixin mixin should still be used until all the interfaces have been converted to lit, as the interface needs to provide the bindings with the @provide decorator:

  @state()
  @provide({context: bindingsContext})
  public bindings: CommerceBindings = {} as CommerceBindings;

To use the decorator, add it to the component class:

@customElement('atomic-icon')
@bindings()
export class AtomicIcon
  extends TailwindLitElement
  implements InitializableComponent<AnyBindings>
{

Copy link

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 243.9 243.9 0
commerce 357 357 0
search 415.1 415.1 0
insight 406.2 406.2 0
recommendation 255.9 255.9 0
ssr 408.8 408.8 0
ssr-commerce 373.5 373.5 0

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.

1 participant