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

Function getStyleProps

packages/react-select/src/utils.ts:116–135  ·  view source on GitHub ↗
(
  props: Pick<
    CommonPropsAndClassName<Option, IsMulti, Group>,
    'cx' | 'getStyles' | 'getClassNames' | 'className'
  > &
    StylesProps<Option, IsMulti, Group>[Key],
  name: Key,
  classNamesState?: ClassNamesState
)

Source from the content-addressed store, hash-verified

114// ==============================
115
116export const getStyleProps = <
117 Option,
118 IsMulti extends boolean,
119 Group extends GroupBase<Option>,
120 Key extends keyof StylesProps<Option, IsMulti, Group>
121>(
122 props: Pick<
123 CommonPropsAndClassName<Option, IsMulti, Group>,
124 'cx' | 'getStyles' | 'getClassNames' | 'className'
125 > &
126 StylesProps<Option, IsMulti, Group>[Key],
127 name: Key,
128 classNamesState?: ClassNamesState
129) => {
130 const { cx, getStyles, getClassNames, className } = props;
131 return {
132 css: getStyles(name, props),
133 className: cx(classNamesState ?? {}, getClassNames(name, props), className),
134 };
135};
136
137// ==============================
138// Handle Input Change

Callers 15

MultiValueFunction · 0.90
SingleValueFunction · 0.90
ControlFunction · 0.90
PlaceholderFunction · 0.90
OptionFunction · 0.90
SelectContainerFunction · 0.90
ValueContainerFunction · 0.90
IndicatorsContainerFunction · 0.90
MenuFunction · 0.90
MenuListFunction · 0.90
NoOptionsMessageFunction · 0.90
LoadingMessageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…