UNPKG

@nova-ui/bits

Version:

SolarWinds Nova Framework

44 lines (43 loc) 1.54 kB
import * as i0 from "@angular/core"; /** * <example-url>./../examples/index.html#/code</example-url><br /> */ /** * @ignore * Purpose of this component is to format and colorize your source code snippets. * Optionally you can * specify a programming language to be used for highlighting, otherwise an automated detection will be used. This * directive is encapsulating Highlight.js library. * * Consumer needs to set up languages which need to be supported. It must happen before CodeComponent is rendered. * The best place is parent page/component's onInit() or in app initializer * example: * * import hljs from "highlight.js"; * * where "highlight.js" should be used as alias to regular "highlight.js/lib/core.js" * to avoid loading all languages. And then just load what you really need, e.g. typescript * * * __Name:__ * * NUI Code component. * * __Usage:__ * * ```html * <nui-example-code [code]=[code]><nui-example-code> * ``` * */ export declare class ExampleCodeComponent { /** * Programming language used (auto-detect if not present) - see * https://highlightjs.org/static/demo/ for possible values */ language: string; codeText: string; set code(c: string); static ɵfac: i0.ɵɵFactoryDeclaration<ExampleCodeComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ExampleCodeComponent, "nui-example-code", never, { "language": { "alias": "language"; "required": false; }; "code": { "alias": "code"; "required": false; }; }, {}, never, never, false, never>; }