UNPKG

rimmel

Version:

A Stream-Oriented UI library for the Rx.Observable Universe

25 lines (22 loc) 741 B
import { SINK_TAG } from '../constants.js'; const HIDDEN_SINK_TAG = 'hidden'; const HiddenSink = (node) => (hidden) => { node.hidden = hidden; }; /** * A specialised sink for the "hidden" HTML attribute * @param source A present or future boolean value * @returns RMLTemplateExpression A template expression for the "hidden" DOM attribute * @example <div hidden="${booleanValue}"> * @example <div hidden="${booleanPromise}"> * @example <div hidden="${booleanObservable}"> * @example <div hidden="${Hidden(booleanPromise)}"> */ const Hidden = (source) => ({ type: SINK_TAG, t: HIDDEN_SINK_TAG, source, sink: HiddenSink, }); export { HIDDEN_SINK_TAG, Hidden, HiddenSink }; //# sourceMappingURL=hidden-sink.js.map