MCPcopy Index your code
hub / github.com/JedWatson/react-select / Option

Function Option

packages/react-select/src/components/Option.tsx:83–107  ·  view source on GitHub ↗
(
  props: OptionProps<Option, IsMulti, Group>
)

Source from the content-addressed store, hash-verified

81});
82
83const Option = <
84 Option,
85 IsMulti extends boolean,
86 Group extends GroupBase<Option>
87>(
88 props: OptionProps<Option, IsMulti, Group>
89) => {
90 const { children, isDisabled, isFocused, isSelected, innerRef, innerProps } =
91 props;
92 return (
93 <div
94 {...getStyleProps(props, 'option', {
95 option: true,
96 'option--is-disabled': isDisabled,
97 'option--is-focused': isFocused,
98 'option--is-selected': isSelected,
99 })}
100 ref={innerRef}
101 aria-disabled={isDisabled}
102 {...innerProps}
103 >
104 {children}
105 </div>
106 );
107};
108
109export default Option;

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…