Last active
December 28, 2020 01:27
-
-
Save fabiomazucato/1cc6054433410c96e1f019a5687fbf84 to your computer and use it in GitHub Desktop.
Skeleton - HomeLoading (index.js)
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
import React from 'react' | |
import { FlatList } from 'react-native' | |
import Skeleton from 'components/skeleton' | |
import { Container, WrapperHeader, Wrapper, Section } from './styles' | |
const HomeLoading = () => { | |
return ( | |
<Container> | |
<WrapperHeader> | |
<Skeleton dimensions={[300, 40]} margin={[0, 0]} circle={5} /> | |
</WrapperHeader> | |
<FlatList | |
data={[{ id: 'load0' }, { id: 'load1' }, { id: 'load2' }]} | |
keyExtractor={(item) => item.id} | |
renderItem={() => ( | |
<Wrapper> | |
<Section> | |
<Skeleton dimensions={[150, 30]} margin={[0, 0]} /> | |
<Skeleton dimensions={['100%', 50]} margin={[15, 0]} /> | |
</Section> | |
</Wrapper> | |
)} | |
/> | |
</Container> | |
) | |
} | |
export default HomeLoading |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment