Add margin to LoadMore button
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
4b489ed524
commit
6144b47349
11 changed files with 14 additions and 1 deletions
|
@ -75,6 +75,8 @@ interface IScrollableList extends VirtuosoProps<any, any> {
|
||||||
listClassName?: string;
|
listClassName?: string;
|
||||||
/** Class names on each item container. */
|
/** Class names on each item container. */
|
||||||
itemClassName?: string;
|
itemClassName?: string;
|
||||||
|
/** Extra class names on the LoadMore element */
|
||||||
|
loadMoreClassName?: string;
|
||||||
/** `id` attribute on the Virtuoso element. */
|
/** `id` attribute on the Virtuoso element. */
|
||||||
id?: string;
|
id?: string;
|
||||||
/** CSS styles on the Virtuoso element. */
|
/** CSS styles on the Virtuoso element. */
|
||||||
|
@ -100,6 +102,7 @@ const ScrollableList = React.forwardRef<VirtuosoHandle, IScrollableList>(({
|
||||||
className,
|
className,
|
||||||
listClassName,
|
listClassName,
|
||||||
itemClassName,
|
itemClassName,
|
||||||
|
loadMoreClassName,
|
||||||
id,
|
id,
|
||||||
hasMore,
|
hasMore,
|
||||||
placeholderComponent: Placeholder,
|
placeholderComponent: Placeholder,
|
||||||
|
@ -195,7 +198,7 @@ const ScrollableList = React.forwardRef<VirtuosoHandle, IScrollableList>(({
|
||||||
if (autoloadMore || !hasMore || !onLoadMore) {
|
if (autoloadMore || !hasMore || !onLoadMore) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
return <LoadMore visible={!isLoading} onClick={onLoadMore} />;
|
return <LoadMore className={loadMoreClassName} visible={!isLoading} onClick={onLoadMore} />;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,7 @@ const Bookmarks: React.FC<IBookmarks> = ({ params }) => {
|
||||||
<PullToRefresh onRefresh={handleRefresh}>
|
<PullToRefresh onRefresh={handleRefresh}>
|
||||||
<StatusList
|
<StatusList
|
||||||
className='black:p-0 black:sm:p-4'
|
className='black:p-0 black:sm:p-4'
|
||||||
|
loadMoreClassName='black:sm:mx-4'
|
||||||
statusIds={statusIds}
|
statusIds={statusIds}
|
||||||
scrollKey='bookmarked_statuses'
|
scrollKey='bookmarked_statuses'
|
||||||
hasMore={hasMore}
|
hasMore={hasMore}
|
||||||
|
|
|
@ -39,6 +39,7 @@ const BubbleTimeline = () => {
|
||||||
<PullToRefresh onRefresh={handleRefresh}>
|
<PullToRefresh onRefresh={handleRefresh}>
|
||||||
<Timeline
|
<Timeline
|
||||||
className='black:p-0 black:sm:p-4'
|
className='black:p-0 black:sm:p-4'
|
||||||
|
loadMoreClassName='black:sm:mx-4'
|
||||||
scrollKey={`${timelineId}_timeline`}
|
scrollKey={`${timelineId}_timeline`}
|
||||||
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}`}
|
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}`}
|
||||||
prefix='home'
|
prefix='home'
|
||||||
|
|
|
@ -42,6 +42,7 @@ const CommunityTimeline = () => {
|
||||||
<PullToRefresh onRefresh={handleRefresh}>
|
<PullToRefresh onRefresh={handleRefresh}>
|
||||||
<Timeline
|
<Timeline
|
||||||
className='black:p-0 black:sm:p-4'
|
className='black:p-0 black:sm:p-4'
|
||||||
|
loadMoreClassName='black:sm:mx-4'
|
||||||
scrollKey={`${timelineId}_timeline`}
|
scrollKey={`${timelineId}_timeline`}
|
||||||
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}`}
|
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}`}
|
||||||
prefix='home'
|
prefix='home'
|
||||||
|
|
|
@ -62,6 +62,7 @@ const HashtagTimeline: React.FC<IHashtagTimeline> = ({ params }) => {
|
||||||
)}
|
)}
|
||||||
<Timeline
|
<Timeline
|
||||||
className='black:p-0 black:sm:p-4'
|
className='black:p-0 black:sm:p-4'
|
||||||
|
loadMoreClassName='black:sm:mx-4'
|
||||||
scrollKey='hashtag_timeline'
|
scrollKey='hashtag_timeline'
|
||||||
timelineId={`hashtag:${tagId}`}
|
timelineId={`hashtag:${tagId}`}
|
||||||
onLoadMore={handleLoadMore}
|
onLoadMore={handleLoadMore}
|
||||||
|
|
|
@ -63,6 +63,7 @@ const HomeTimeline: React.FC = () => {
|
||||||
<PullToRefresh onRefresh={handleRefresh}>
|
<PullToRefresh onRefresh={handleRefresh}>
|
||||||
<Timeline
|
<Timeline
|
||||||
className='black:p-0 black:sm:p-4'
|
className='black:p-0 black:sm:p-4'
|
||||||
|
loadMoreClassName='black:sm:mx-4'
|
||||||
scrollKey='home_timeline'
|
scrollKey='home_timeline'
|
||||||
onLoadMore={handleLoadMore}
|
onLoadMore={handleLoadMore}
|
||||||
timelineId='home'
|
timelineId='home'
|
||||||
|
|
|
@ -49,6 +49,7 @@ const LandingTimeline = () => {
|
||||||
<PullToRefresh onRefresh={handleRefresh}>
|
<PullToRefresh onRefresh={handleRefresh}>
|
||||||
<Timeline
|
<Timeline
|
||||||
className='black:p-0 black:sm:p-4'
|
className='black:p-0 black:sm:p-4'
|
||||||
|
loadMoreClassName='black:sm:mx-4'
|
||||||
scrollKey={`${timelineId}_timeline`}
|
scrollKey={`${timelineId}_timeline`}
|
||||||
timelineId={timelineId}
|
timelineId={timelineId}
|
||||||
prefix='home'
|
prefix='home'
|
||||||
|
|
|
@ -104,6 +104,7 @@ const ListTimeline: React.FC = () => {
|
||||||
>
|
>
|
||||||
<Timeline
|
<Timeline
|
||||||
className='black:p-0 black:sm:p-4'
|
className='black:p-0 black:sm:p-4'
|
||||||
|
loadMoreClassName='black:sm:mx-4'
|
||||||
scrollKey='list_timeline'
|
scrollKey='list_timeline'
|
||||||
timelineId={`list:${id}`}
|
timelineId={`list:${id}`}
|
||||||
onLoadMore={handleLoadMore}
|
onLoadMore={handleLoadMore}
|
||||||
|
|
|
@ -87,6 +87,7 @@ const CommunityTimeline = () => {
|
||||||
<PullToRefresh onRefresh={handleRefresh}>
|
<PullToRefresh onRefresh={handleRefresh}>
|
||||||
<Timeline
|
<Timeline
|
||||||
className='black:p-0 black:sm:p-4'
|
className='black:p-0 black:sm:p-4'
|
||||||
|
loadMoreClassName='black:sm:mx-4'
|
||||||
scrollKey={`${timelineId}_timeline`}
|
scrollKey={`${timelineId}_timeline`}
|
||||||
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}`}
|
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}`}
|
||||||
prefix='home'
|
prefix='home'
|
||||||
|
|
|
@ -40,6 +40,7 @@ const Quotes: React.FC = () => {
|
||||||
<Column label={intl.formatMessage(messages.heading)} transparent={!isMobile}>
|
<Column label={intl.formatMessage(messages.heading)} transparent={!isMobile}>
|
||||||
<StatusList
|
<StatusList
|
||||||
className='black:p-0 black:sm:p-4'
|
className='black:p-0 black:sm:p-4'
|
||||||
|
loadMoreClassName='black:sm:mx-4'
|
||||||
statusIds={statusIds as ImmutableOrderedSet<string>}
|
statusIds={statusIds as ImmutableOrderedSet<string>}
|
||||||
scrollKey={`quotes:${statusId}`}
|
scrollKey={`quotes:${statusId}`}
|
||||||
hasMore={hasMore}
|
hasMore={hasMore}
|
||||||
|
|
|
@ -67,6 +67,7 @@ const RemoteTimeline: React.FC<IRemoteTimeline> = ({ params }) => {
|
||||||
|
|
||||||
<Timeline
|
<Timeline
|
||||||
className='black:p-0 black:sm:p-4'
|
className='black:p-0 black:sm:p-4'
|
||||||
|
loadMoreClassName='black:sm:mx-4'
|
||||||
scrollKey={`${timelineId}_${instance}_timeline`}
|
scrollKey={`${timelineId}_${instance}_timeline`}
|
||||||
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}:${instance}`}
|
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}:${instance}`}
|
||||||
onLoadMore={handleLoadMore}
|
onLoadMore={handleLoadMore}
|
||||||
|
|
Loading…
Reference in a new issue