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

Function toggleExpanded

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

Source from the content-addressed store, hash-verified

368 () => ({
369 isExpanded,
370 toggleExpanded() {
371 if (!isExpanded && queue.visibleToasts.length <= 1) {
372 return;
373 }
374
375 startViewTransition(() => toggle(), isExpanded ? 'toast-collapse' : 'toast-expand');
376 }
377 }),
378 [isExpanded, toggle, queue]
379 );

Callers 1

SpectrumToastListFunction · 0.85

Calls 2

startViewTransitionFunction · 0.85
toggleFunction · 0.50

Tested by

no test coverage detected