MCPcopy
hub / github.com/JedWatson/react-select / classNames

Function classNames

packages/react-select/src/utils.ts:44–62  ·  view source on GitHub ↗
(
  prefix?: string | null,
  state?: ClassNamesState,
  ...classNameList: string[]
)

Source from the content-addressed store, hash-verified

42}
43
44export 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// ==============================

Callers 4

SelectClass · 0.90
StatusCircleFunction · 0.85
TemplateFunction · 0.85
TemplateFunction · 0.85

Calls 1

applyPrefixToNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…