From 6144b473494d0b13f19311c1bb09c7fdfacbc062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Mon, 26 Aug 2024 00:37:00 +0200 Subject: [PATCH] Add margin to LoadMore button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/components/scrollable-list.tsx | 5 ++++- src/features/bookmarks/index.tsx | 1 + src/features/bubble-timeline/index.tsx | 1 + src/features/community-timeline/index.tsx | 1 + src/features/hashtag-timeline/index.tsx | 1 + src/features/home-timeline/index.tsx | 1 + src/features/landing-timeline/index.tsx | 1 + src/features/list-timeline/index.tsx | 1 + src/features/public-timeline/index.tsx | 1 + src/features/quotes/index.tsx | 1 + src/features/remote-timeline/index.tsx | 1 + 11 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/scrollable-list.tsx b/src/components/scrollable-list.tsx index 7f6bb23f6..e19f70069 100644 --- a/src/components/scrollable-list.tsx +++ b/src/components/scrollable-list.tsx @@ -75,6 +75,8 @@ interface IScrollableList extends VirtuosoProps { listClassName?: string; /** Class names on each item container. */ itemClassName?: string; + /** Extra class names on the LoadMore element */ + loadMoreClassName?: string; /** `id` attribute on the Virtuoso element. */ id?: string; /** CSS styles on the Virtuoso element. */ @@ -100,6 +102,7 @@ const ScrollableList = React.forwardRef(({ className, listClassName, itemClassName, + loadMoreClassName, id, hasMore, placeholderComponent: Placeholder, @@ -195,7 +198,7 @@ const ScrollableList = React.forwardRef(({ if (autoloadMore || !hasMore || !onLoadMore) { return null; } else { - return ; + return ; } }; diff --git a/src/features/bookmarks/index.tsx b/src/features/bookmarks/index.tsx index eeade3c04..3023c4204 100644 --- a/src/features/bookmarks/index.tsx +++ b/src/features/bookmarks/index.tsx @@ -110,6 +110,7 @@ const Bookmarks: React.FC = ({ params }) => { { { = ({ params }) => { )} { { { > { { } scrollKey={`quotes:${statusId}`} hasMore={hasMore} diff --git a/src/features/remote-timeline/index.tsx b/src/features/remote-timeline/index.tsx index 140ae84cf..02295f6bc 100644 --- a/src/features/remote-timeline/index.tsx +++ b/src/features/remote-timeline/index.tsx @@ -67,6 +67,7 @@ const RemoteTimeline: React.FC = ({ params }) => {