-
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/561225efbb51019451599a0545f4666beb215df3/libs/composables/class/src/provide-base-class.ts#L31)