MCPcopy Create free account
hub / github.com/adobe/react-spectrum / CloseButton

Function CloseButton

packages/@react-spectrum/ai/src/AttachmentList.tsx:315–331  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

313});
314
315const CloseButton = function CloseButton(props) {
316 let ref = useRef(null);
317 // oxlint-disable react/react-compiler
318 return (
319 <Button
320 {...props}
321 ref={ref}
322 slot="remove"
323 style={pressScale(ref, {})}
324 className={renderProps =>
325 mergeStyles(closeButton({...renderProps, size: props.size || 'M'}), props.styles)
326 }>
327 <Cross size="M" />
328 </Button>
329 );
330 // oxlint-enable react/react-compiler
331};
332
333export interface AttachmentListProps<T>
334 extends

Callers

nothing calls this directly

Calls 2

pressScaleFunction · 0.90
mergeStylesFunction · 0.50

Tested by

no test coverage detected