Skip to content

Instantly share code, notes, and snippets.

@fabiomazucato
Last active December 28, 2020 01:27
Show Gist options
  • Save fabiomazucato/1cc6054433410c96e1f019a5687fbf84 to your computer and use it in GitHub Desktop.
Save fabiomazucato/1cc6054433410c96e1f019a5687fbf84 to your computer and use it in GitHub Desktop.
Skeleton - HomeLoading (index.js)
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