Skip to main content

Post Upload Indicator

The LMPostUploadIndicator component provides a visual indicator while a post is uploading. It displays a loading spinner, a message, and an optional media preview to inform users about the ongoing upload status along with options to retry a failed attempt when uploading a post. This component is designed to be integrated within the Universal Feed.

GitHub File:

LMFeedPostContent

UI Components​

Styling Customisations​

These styling customisations can be applied through the setUploadingHeaderStyles method on the STYLES class

PropertyTypeDescription
uploadingTextStyleTextStyleStyle for the uploading text.
retryButtonStyleobjectStyles for the retry button.
├ buttonStyleViewStyleStyle for the retry button container.
├ iconStyleLMIconPropsStyle for the retry button icon.
└ textStyleTextStyleStyle for the retry button text.
cancelButtonStyleobjectStyles for the cancel button.
├ buttonStyleViewStyleStyle for the cancel button container.
└ textStyleTextStyleStyle for the cancel button text.
progressBarStyleobjectStyles for the progress bar.
├ sizenumberSize of the progress bar.
├ widthnumberWidth of the progress bar.
└ tintColorstringColor of the progress bar.

Integration​

To use this component, import it and add it as a child of the UniversalFeed.

Here’s how you integrate LMPostUploadIndicator within a screen:

import React from "react";
import {
LMPostUploadIndicator,
UniversalFeed,
} from "@likeminds.community/feed-rn-core";

const CustomFeedScreen = () => {

STYLES.setUploadingHeaderStyles({
cancelButtonStyle: {
buttonStyle: {
backgroundColor: 'green'
},
},
uploadingTextStyle: {
color: 'red',
fontSize: 20
}
})

return (
<UniversalFeed>
{/* Other feed components */}
<LMPostUploadIndicator />
</UniversalFeed>
);
};

export default CustomFeedScreen;