Skip to main content

authoring

Shortcuts for showing/hiding content.

import {Utils} from "liqvid";
const {during, from} = Utils.authoring;

during()

Returns a CSS block to show the element only when marker name begins with prefix.

during: (prefix: string) => {"data-during": string;};

from()

Returns a CSS block to show the element when marker is in [first, last).

from: (first: string, last?: string) => {"data-from-first": string; "data-from-last"?: string;};

showIf()

showIf(cond: boolean): {style?: React.CSSProperties;};