-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #616 from sonaliTekdi/webapp_changes
Task #226403 - [FE] - While API loading Page loaders are missing
- Loading branch information
Showing
20 changed files
with
208 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,13 @@ | ||
import { Center, VStack, Text, Spinner, Heading } from 'native-base' | ||
import { Center, HStack, Spinner, Heading } from 'native-base' | ||
import React from 'react' | ||
import { useWindowSize } from './helper' | ||
|
||
export default function Loading({ message = 'Loading', ...prop }) { | ||
const [width, height] = useWindowSize() | ||
|
||
export default function Loading({ message = 'Loading...'}) { | ||
return ( | ||
<Center | ||
_text={{ | ||
color: 'white', | ||
fontWeight: 'bold' | ||
}} | ||
height={prop?.height ? prop.height : height} | ||
width={prop?.width ? prop.width : width} | ||
{...prop?._center} | ||
> | ||
{prop?.customComponent ? ( | ||
prop?.customComponent | ||
) : ( | ||
<VStack space={2} alignItems={'center'}> | ||
<VStack space={10} alignItems='center'> | ||
{prop?.icon ? ( | ||
prop.icon | ||
) : ( | ||
<Spinner | ||
color={'primary'} | ||
accessibilityLabel='Loading posts' | ||
size='lg' | ||
/> | ||
)} | ||
<VStack alignItems='center' space={2}> | ||
<Heading color='primary' fontSize='22px'> | ||
{message} | ||
</Heading> | ||
</VStack> | ||
</VStack> | ||
</VStack> | ||
)} | ||
<Center> | ||
<HStack space={2} alignItems="center"> | ||
<Spinner accessibilityLabel="Loading posts" color="#0e7a9c" /> | ||
<Heading size="md" color="#0e7a9c">{message}</Heading> | ||
</HStack> | ||
</Center> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.