-
Notifications
You must be signed in to change notification settings - Fork 0
@bynary.composables.class.Function.provideBaseClass
github-actions[bot] edited this page Jul 11, 2024
·
3 revisions
@bynary/composables / @bynary/composables/class / provideBaseClass
provideBaseClass(
baseClass
):object
Provide a base CSS class that should be applied to a host. The base class can be injected using the BASE_CLASS token. This token will be used by useModifier and useModifierGroup to generate modifier classes.
• baseClass: string
object
provide:
InjectionToken
<string
> =BASE_CLASS
useValue:
string
=baseClass
- useModifier
- useModifierGroup
@Component({
selector: 'my-component',
providers: [
provideBaseClass('my-component')
]
})
class MyComponent {
baseClass = inject(BASE_CLASS); // 'my-component'
}
@param baseClass - The base class to provide.
@returns A provider for the {@link BASE_CLASS} token.
## Defined in
[class/src/provide-base-class.ts:31](https://github.com/bynaryDE/angular-extensions/blob/300e7e2a61055b2a862201157b9851536d259f80/libs/composables/class/src/provide-base-class.ts#L31)