Skip to main content

Function: bindStyleMap()

Call Signature

bindStyleMap(mapToBind, stylesToSubscribe, reservedStyles): Subscription

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

Binds a MutableSubscribableMap to a subscribable map of CSS styles. Modifications to the CSS styles in the subscribed map will be reflected in the bound map, with the exception of a set of reserved styles. The values of any of the reserved styles in the bound map is not affected by the subscribed map.

Parameters

ParameterTypeDescription
mapToBindMutableSubscribableMap<string, string>The map to bind.
stylesToSubscribeSubscribableMap<string, string>A key-value map of CSS styles to which to subscribe.
reservedStylesIterable<string>An iterable of reserved styles.

Returns

Subscription

The newly created subscription to the subscribed CSS style map.

Call Signature

bindStyleMap(mapToBind, stylesToSubscribe, reservedStyles): Subscription

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

Binds a MutableSubscribableMap to an ObjectSubject of CSS styles. Modifications to the CSS styles in the subject will be reflected in the bound map, with the exception of a set of reserved styles. The values of any of the reserved styles in the bound map is not affected by the subscribed subject.

Parameters

ParameterTypeDescription
mapToBindMutableSubscribableMap<string, string>The map to bind.
stylesToSubscribeObjectSubject<Record<string, any>>An ObjectSubject of CSS styles to which to subscribe.
reservedStylesIterable<string>An iterable of reserved styles.

Returns

Subscription

The newly created subscription to the CSS style ObjectSubject.

Call Signature

bindStyleMap(mapToBind, stylesToSubscribe, reservedStyles): Subscription[]

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

Binds a MutableSubscribableMap to a record of CSS styles. Modifications to the CSS styles in the record will be reflected in the bound map, with the exception of a set of reserved styles. The values of any of the reserved styles in the bound map is not affected by the subscribed record.

Parameters

ParameterTypeDescription
mapToBindMutableSubscribableMap<string, string>The map to bind.
stylesToSubscribeStyleRecordA record of CSS styles to which to subscribe.
reservedStylesIterable<string>An iterable of reserved styles.

Returns

Subscription[]

The newly created subscriptions to the CSS style record.

Call Signature

bindStyleMap(mapToBind, stylesToSubscribe, reservedStyles): Subscription | Subscription[]

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

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
mapToBindMutableSubscribableMap<string, string>The set to bind.
stylesToSubscribeStyleRecord | SubscribableMap<string, string> | ObjectSubject<Record<string, any>>A set or record of CSS classes to which to subscribe.
reservedStylesIterable<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.