Skip to content

Commit

Permalink
chore(jsdoc): add jsdoc to src/compiler/style/scope-css.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhduy1407 committed Apr 23, 2024
1 parent 8f1b907 commit 42a0776
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/compiler/style/scope-css.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
import { DEFAULT_STYLE_MODE } from '@utils';

/**
* Get a unique component ID which incorporates the component tag name and
* (optionally) a style mode
*
* e.g. for the tagName `'my-component'` and the mode `'ios'` this would be
* `'sc-my-component-ios'`.
*
* @param tagName the tag name for the component of interest
* @param mode an optional mode
* @returns a scope ID
*/
export const getScopeId = (tagName: string, mode?: string) => {
return 'sc-' + tagName + (mode && mode !== DEFAULT_STYLE_MODE ? '-' + mode : '');
};

0 comments on commit 42a0776

Please sign in to comment.