( prefix?: string | null, state?: ClassNamesState, ...classNameList: string[] )
| 42 | } |
| 43 | |
| 44 | export function classNames( |
| 45 | prefix?: string | null, |
| 46 | state?: ClassNamesState, |
| 47 | ...classNameList: string[] |
| 48 | ) { |
| 49 | const arr = [...classNameList]; |
| 50 | if (state && prefix) { |
| 51 | for (let key in state) { |
| 52 | if (state.hasOwnProperty(key) && state[key]) { |
| 53 | arr.push(`${applyPrefixToName(prefix, key)}`); |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | return arr |
| 59 | .filter((i) => i) |
| 60 | .map((i) => String(i).trim()) |
| 61 | .join(' '); |
| 62 | } |
| 63 | // ============================== |
| 64 | // Clean Value |
| 65 | // ============================== |
no test coverage detected
searching dependent graphs…