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

Function Control

packages/react-select/src/components/Control.tsx:71–95  ·  view source on GitHub ↗
(
  props: ControlProps<Option, IsMulti, Group>
)

Source from the content-addressed store, hash-verified

69});
70
71const Control = <
72 Option,
73 IsMulti extends boolean,
74 Group extends GroupBase<Option>
75>(
76 props: ControlProps<Option, IsMulti, Group>
77) => {
78 const { children, isDisabled, isFocused, innerRef, innerProps, menuIsOpen } =
79 props;
80 return (
81 <div
82 ref={innerRef}
83 {...getStyleProps(props, 'control', {
84 control: true,
85 'control--is-disabled': isDisabled,
86 'control--is-focused': isFocused,
87 'control--menu-is-open': menuIsOpen,
88 })}
89 {...innerProps}
90 aria-disabled={isDisabled || undefined}
91 >
92 {children}
93 </div>
94 );
95};
96
97export default Control;

Callers

nothing calls this directly

Calls 1

getStylePropsFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…