Skip to main content

Function: bindCssClassSet()

Call Signature

bindCssClassSet(setToBind, classesToSubscribe, reservedClasses): Subscription

Defined in: src/sdk/components/FSComponent.ts:858

Binds a MutableSubscribableSet to a subscribable set of CSS classes. CSS classes added to and removed from the subscribed set will also be added to and removed from the bound set, with the exception of a set of reserved classes. The presence or absence of any of the reserved classes in the bound set is not affected by the subscribed set.

Parameters

ParameterTypeDescription
setToBindMutableSubscribableSet<string>The set to bind.
classesToSubscribeSubscribableSet<string>A set of CSS classes to which to subscribe.
reservedClassesIterable<string>An iterable of reserved classes.

Returns

Subscription

The newly created subscription to the subscribed CSS class set.

Call Signature

bindCssClassSet(setToBind, classesToSubscribe, reservedClasses): Subscription[]

Defined in: src/sdk/components/FSComponent.ts:872

Binds a MutableSubscribableSet to a record of CSS classes. CSS classes toggled in the record will also be added to and removed from the bound set, with the exception of a set of reserved classes. The presence or absence of any of the reserved classes in the bound set is not affected by the subscribed record.

Parameters

ParameterTypeDescription
setToBindMutableSubscribableSet<string>The set to bind.
classesToSubscribeToggleableClassNameRecordA record of CSS classes to which to subscribe.
reservedClassesIterable<string>An iterable of reserved classes.

Returns

Subscription[]

The newly created subscriptions to the CSS class record.

Call Signature

bindCssClassSet(setToBind, classesToSubscribe, reservedClasses): Subscription | Subscription[]

Defined in: src/sdk/components/FSComponent.ts:888

Binds a MutableSubscribableSet to a subscribable set or a record of CSS classes. CSS classes toggled in subscribed set or record will also be added to and removed from the bound set, with the exception of a set of reserved classes. The presence or absence of any of the reserved classes in the bound set is not affected by the subscribed set or record.

Parameters

ParameterTypeDescription
setToBindMutableSubscribableSet<string>The set to bind.
classesToSubscribeToggleableClassNameRecord | SubscribableSet<string>A set or record of CSS classes to which to subscribe.
reservedClassesIterable<string>An iterable of reserved classes.

Returns

Subscription | Subscription[]

The newly created subscription to the CSS class set, or an array of new subscriptions to the CSS class record.