-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0949f36
commit 70ceeb9
Showing
2 changed files
with
12 additions
and
15 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
packages/cli/templates/react/igr-ts/projects/_base/files/src/app/style-utils.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* Creates a class transformer function that maps matches from a module object | ||
* @param styles Object map of classes and their scoped name, normally from a CSS Module import | ||
*/ | ||
export default function createClassTransformer(styles: any) { | ||
return (classes: string) => { | ||
return classes | ||
.split(' ') | ||
.map(className => styles[className] || className) | ||
.join(' '); | ||
} | ||
} |
15 changes: 0 additions & 15 deletions
15
packages/cli/templates/react/igr-ts/projects/_base/files/src/app/style-utils.tsx
This file was deleted.
Oops, something went wrong.