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

Function toggleExpanded

packages/@react-spectrum/s2/src/Toast.tsx:361–367  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

359 () => ({
360 isExpanded,
361 toggleExpanded() {
362 if (!isExpanded && queue.visibleToasts.length <= 1) {
363 return;
364 }
365
366 startViewTransition(() => toggle(), isExpanded ? 'toast-collapse' : 'toast-expand');
367 }
368 }),
369 [isExpanded, toggle, queue]
370 );

Callers 1

SpectrumToastListFunction · 0.85

Calls 2

startViewTransitionFunction · 0.85
toggleFunction · 0.50

Tested by

no test coverage detected