From 81b1e0e05919eb368a66aef47adcf7738af76f29 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 29 Sep 2023 11:47:06 +0200 Subject: refactor(components): rewrite Spinner component * Message should be set as children * Default message is no longer available (depending on use case, the consumer might prefer aria-label instead) * It is now possible to define the message position --- src/components/organisms/layout/posts-list.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/components/organisms/layout') diff --git a/src/components/organisms/layout/posts-list.tsx b/src/components/organisms/layout/posts-list.tsx index f04ba74..5401ed1 100644 --- a/src/components/organisms/layout/posts-list.tsx +++ b/src/components/organisms/layout/posts-list.tsx @@ -165,8 +165,14 @@ export const PostsList: FC = ({ const loadMoreBody = intl.formatMessage({ defaultMessage: 'Load more articles?', - id: 'uaqd5F', description: 'PostsList: load more button', + id: 'uaqd5F', + }); + + const loadingMoreArticles = intl.formatMessage({ + defaultMessage: 'Loading more articles...', + description: 'PostsList: loading more articles message', + id: 'xYemkP', }); /** @@ -224,7 +230,7 @@ export const PostsList: FC = ({ return ( <> {getPosts()} - {isLoading ? : null} + {isLoading ? {loadingMoreArticles} : null} {isMounted ? getProgressBar() : getPagination()} ); -- cgit v1.2.3