Skip to content

Instantly share code, notes, and snippets.

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