(styles: ComponentStylesData)
| 3 | const MAX_DEPTH_INHERITED_CLASSES = 10; // TypeScript complains about Infinity and big numbers |
| 4 | |
| 5 | const getStylesString = (styles: ComponentStylesData) => { |
| 6 | if (Array.isArray(styles)) { |
| 7 | return (styles.filter(style => !!style).flat(MAX_DEPTH_INHERITED_CLASSES) as Array<string>).join(" "); |
| 8 | } |
| 9 | |
| 10 | return styles; |
| 11 | }; |
| 12 | |
| 13 | export default getStylesString; |
no outgoing calls
no test coverage detected
searching dependent graphs…