Last active
December 27, 2020 23:16
-
-
Save fabiomazucato/e9374232dbae3f648b1c29376d1b2a81 to your computer and use it in GitHub Desktop.
Skeleton - Parte 1 (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 { createElement } from 'react' | |
import View from './view' | |
const SkeletonContainer = (props) => { | |
const { dimensions = [0, 0], circle = null, margin = [0, 0] } = props | |
const viewProps = { | |
marginHorizontal: margin[0], | |
marginVertical: margin[1], | |
circle, | |
width: dimensions[0], | |
height: dimensions[1] | |
} | |
return createElement(View, viewProps) | |
} | |
export default SkeletonContainer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment