-
Notifications
You must be signed in to change notification settings - Fork 0
@bynary.composables.class.Interface.IBindModifierOptions
github-actions[bot] edited this page Jul 11, 2024
·
3 revisions
@bynary/composables / @bynary/composables/class / IBindModifierOptions
A set of options for bindModifier
optional
baseClass:string
The base class. There is usually one base class per component.
While you're always able to explicitly set a base class via the options, it's recommended to use the provideBaseClass function to provide the base class to the component. Especially, when using useModifier/bindModifier or useModifierGroup/bindModifierGroup multiple times in one directive or component.
WARNING: If you don't provide a base class either via options.baseClass
or via provideBaseClass
, an error will be thrown!
const isLoading = signal(false);
bindModifier('is-loading', isLoading, { baseClass: 'my-button' }); // <my-component class="my-button"></my-component>