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

Function LoadingState

packages/@adobe/react-spectrum/src/card/CardView.tsx:178–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176}) as <T>(props: SpectrumCardViewProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
177
178function LoadingState() {
179 let {state} = useCardViewContext();
180 let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/card');
181 return (
182 <CenteredWrapper>
183 <ProgressCircle
184 isIndeterminate
185 aria-label={
186 state.collection.size > 0
187 ? stringFormatter.format('loadingMore')
188 : stringFormatter.format('loading')
189 }
190 />
191 </CenteredWrapper>
192 );
193}
194
195function EmptyState() {
196 let {renderEmptyState} = useCardViewContext();

Callers

nothing calls this directly

Calls 3

useCardViewContextFunction · 0.90
formatMethod · 0.45

Tested by

no test coverage detected