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

Function MultiValue

packages/react-select/src/components/MultiValue.tsx:159–214  ·  view source on GitHub ↗
(
  props: MultiValueProps<Option, IsMulti, Group>
)

Source from the content-addressed store, hash-verified

157}
158
159const MultiValue = <
160 Option,
161 IsMulti extends boolean,
162 Group extends GroupBase<Option>
163>(
164 props: MultiValueProps<Option, IsMulti, Group>
165) => {
166 const {
167 children,
168 components,
169 data,
170 innerProps,
171 isDisabled,
172 removeProps,
173 selectProps,
174 } = props;
175
176 const { Container, Label, Remove } = components;
177
178 return (
179 <Container
180 data={data}
181 innerProps={{
182 ...getStyleProps(props, 'multiValue', {
183 'multi-value': true,
184 'multi-value--is-disabled': isDisabled,
185 }),
186 ...innerProps,
187 }}
188 selectProps={selectProps}
189 >
190 <Label
191 data={data}
192 innerProps={{
193 ...getStyleProps(props, 'multiValueLabel', {
194 'multi-value__label': true,
195 }),
196 }}
197 selectProps={selectProps}
198 >
199 {children}
200 </Label>
201 <Remove
202 data={data}
203 innerProps={{
204 ...getStyleProps(props, 'multiValueRemove', {
205 'multi-value__remove': true,
206 }),
207 'aria-label': `Remove ${children || 'option'}`,
208 ...removeProps,
209 }}
210 selectProps={selectProps}
211 />
212 </Container>
213 );
214};
215
216export default MultiValue;

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…