@qctrl/visualizer
Version:
The Q-CTRL Visualizer is a package for displaying animated 3d Bloch sphere visualizations.
20 lines (19 loc) • 928 B
TypeScript
type Styles = Record<string, string>;
export declare const CLASS_NAME_PREFIX: string;
/**
* Takes a styles object and an optional HTML Element and updates the passed in Element's OR a deafult Element's style attributes with the style attributes from the passed in style object
*/
declare const updateStylePropsOnElement: (styles: Styles, element?: HTMLElement) => HTMLElement;
/**
* Takes an HTML element and gets the css text string from it
*/
declare const getCSStringFromElement: (element: HTMLElement) => string;
/**
* Takes a style object and returns a CSS style string
*/
declare const getCSStringFromStyleObj: (styles: Styles) => string;
/**
* Creates and returns a new <style></style> HTML element with the passed in styles attached
*/
declare const makeStyleElement: (styles: string) => HTMLStyleElement;
export { updateStylePropsOnElement, getCSStringFromElement, getCSStringFromStyleObj, makeStyleElement, };