Navigation | Overlay |
---|---|
t Navigate files | h Toggle hits |
y Change url to tip of branch | m Toggle misses |
b / v Jump to prev/next hit line | p Toggle partial |
z / x Jump to prev/next missed or partial line | 1..9 Toggle flags |
shift + o Open current page in GitHub | a Toggle all on |
/ or ? Show keyboard shortcuts dialog | c Toggle context lines or commits |
1 |
import * as Rsg from 'react-styleguidist' |
|
2 |
import { SanitizedStyleguidistConfig } from '../../types/StyleGuide' |
|
3 | 1 |
import processComponent from './processComponent' |
4 |
|
|
5 |
/**
|
|
6 |
* Process each component in a list.
|
|
7 |
*
|
|
8 |
* @param {Array} components File names of components.
|
|
9 |
* @param {object} config
|
|
10 |
* @returns {object|null}
|
|
11 |
*/
|
|
12 | 1 |
export default function getComponents( |
13 |
components: string[], |
|
14 |
config: SanitizedStyleguidistConfig, |
|
15 | 1 |
subComponentsPaths?: Record<string, string[]> |
16 |
): Rsg.LoaderComponent[] { |
|
17 | 1 |
return components.map(filepath => |
18 | 1 |
processComponent( |
19 |
filepath, |
|
20 |
config, |
|
21 |
subComponentsPaths ? subComponentsPaths[filepath] : undefined |
|
22 |
)
|
|
23 |
)
|
|
24 |
}
|
Read our documentation on viewing source code .