diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-09-29 11:47:06 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-10-24 12:25:00 +0200 |
| commit | 81b1e0e05919eb368a66aef47adcf7738af76f29 (patch) | |
| tree | 758577d3f58d7025f84bca5bac9bc0da8432deb7 /src/components/organisms/layout | |
| parent | 3272ac336da52364ace5ed76d8f609d4088ffc06 (diff) | |
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
Diffstat (limited to 'src/components/organisms/layout')
| -rw-r--r-- | src/components/organisms/layout/posts-list.tsx | 10 |
1 files changed, 8 insertions, 2 deletions
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<PostsListProps> = ({ 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<PostsListProps> = ({ return ( <> {getPosts()} - {isLoading ? <Spinner /> : null} + {isLoading ? <Spinner>{loadingMoreArticles}</Spinner> : null} {isMounted ? getProgressBar() : getPagination()} </> ); |
