How to use the @stylable/core.getCssDocsForSymbol function in @stylable/core

To help you get started, we’ve selected a few @stylable/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wix / stylable / packages / schema-extract / src / main.ts View on Github external
function generateCssDocs(
    meta: StylableMeta,
    symbol: ClassSymbol | ElementSymbol | VarSymbol,
    schemaEntry: StylableSymbolSchema
) {
    const cssDoc = getCssDocsForSymbol(meta, symbol);
    if (cssDoc) {
        if (cssDoc.description) {
            schemaEntry.description = cssDoc.description;
        }
        if (Object.keys(cssDoc.tags).length) {
            schemaEntry.docTags = cssDoc.tags;
        }
    }
}