Adds debugging information to stories
This commit is contained in:
parent
badf9d7dda
commit
06476de6c9
36 changed files with 1089 additions and 530 deletions
|
@ -7,11 +7,16 @@ export function getClassNamesFor(
|
|||
...modules: Array<string | undefined>
|
||||
): (modifier?: string) => string {
|
||||
return modifier => {
|
||||
const cx = modules.map(parentModule =>
|
||||
parentModule && modifier !== undefined
|
||||
? `${parentModule}${modifier}`
|
||||
: undefined
|
||||
);
|
||||
if (modifier === undefined) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const cx = modules
|
||||
.flatMap(m => (m ? m.split(' ') : undefined))
|
||||
.map(parentModule =>
|
||||
parentModule ? `${parentModule}${modifier}` : undefined
|
||||
);
|
||||
|
||||
return classNames(cx);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue