UNPKG

@workday/canvas-kit-docs

Version:

Documentation components of Canvas Kit components

81 lines 3.72 kB
import React from 'react'; import { StyledType } from '@workday/canvas-kit-react/common'; import * as types from '../docgen/docTypes'; /** React context to track the current rendering context to avoid tables inside tables */ export declare const RenderContext: React.Context<"table" | "inline">; /** * React context to track the current heading level. This is useful to relatively change heading * levels of a subtree */ export declare const HeadingLevelContext: React.Context<number>; /** * React context to keep track of the current indent level */ export declare const IndentLevelContext: React.Context<number>; /** * Utility function for getting non-breaking space for code formatting. It will print a string of * non-breaking spaces according to the level provided. These characters are safe for a React render * function. */ export declare function indent(level: number): string; export declare function capitalize(input: string): string; interface HeadingProps { headingOffset?: number; } /** * Special heading component that uses @mdx-js/react heading components, but is also aware of * relative heading levels. */ export declare const Heading: import("@workday/canvas-kit-react/common").ElementComponent<"h4", HeadingProps>; export declare function renderTypeParameters(typeParameters?: types.TypeParameter[]): "" | import("react/jsx-runtime").JSX.Element; export interface SymbolDialogProps { value: types.SymbolValue; } export declare const SymbolDialog: ({ value }: SymbolDialogProps) => import("react/jsx-runtime").JSX.Element; export declare const useDoc: (criteria: ValueDocProps) => types.ExportedSymbol<types.Value> | undefined; export interface ValueDocProps { name: string; fileName?: string; } /** * Renders the `<Value>` of a exported symbol without any wrapper. This should be used when nesting * inside a `<SymbolDoc>` component. */ export declare const SymbolValue: (props: ValueDocProps) => import("react/jsx-runtime").JSX.Element; /** * Renders just the description of an exported symbol. */ export declare const SymbolDescription: (props: ValueDocProps) => import("react/jsx-runtime").JSX.Element | null; export interface SymbolDocProps extends ValueDocProps, StyledType { /** * `SymbolDoc` can support heading levels inside widgets. The `headingStart` determines the * initial heading level. From there, a React.Context called `HeadingLevelContext` maintains this * level to subcomponents. This helps to maintain a document hierarchy of heading levels. */ headingStart?: number; /** * `SymbolDoc` will render a heading at the provided `headingStart` level unless `hideHeading` is * passed. */ hideHeading?: boolean; /** * `SymbolDoc` will render the `descriptionOverride` if provided or the JSDoc description if * found. Setting `hideDescription` will disable this rendering of the description. */ hideDescription?: boolean; /** * By default, `SymbolDoc` will render the JSDoc description if found. This description can be * overridden to display a custom description. This can be useful if you know that the description * should be given a specific context of the widget type. */ descriptionOverride?: string; meta?: Record<string, any>; className?: string; } /** * Renders an exported symbol as a doc object. This will render JSDoc tags, description and setup * rendering contexts for headers. */ export declare const SymbolDoc: ({ name, fileName, headingStart, hideDescription, hideHeading, descriptionOverride, meta, ...elemProps }: SymbolDocProps) => import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=widgetUtils.d.ts.map